Cadre et limites de CAShapeLayer

Je suis en train de travailler sur CAShapeLayer.Et de tenter de tirer des non-linéaire.Je tiens à mettre en image à CAShapeLayer.Donc je peux l'utiliser CGPathGetPathBoundingBox méthode pour obtenir de l'image à partir de CGPathRef.

Voici le code :

CGMutablePathRef path = CGPathCreateMutable();
CGPathAddArc(path, NULL, rect.size.width/2, rect.size.height/2, 100, (0), (M_PI_2), NO);
CGPathAddArc(path, NULL, rect.size.width/2, rect.size.height/2, 100-50, (M_PI_2), (0), YES);
CGPathCloseSubpath(path);
CAShapeLayer* arcLayer = [[CAShapeLayer alloc]init];
arcLayer.path = path;
arcLayer.frame = CGPathGetPathBoundingBox(path);
arcLayer.bounds = CGPathGetPathBoundingBox(path);
[self.layer addSublayer:arcLayer]; ` 

Veuillez consulter mon code avec soin .J'ai mis la même image et les limites de CAShapeLayer.Mon problème est que si je suis de ne pas fixer de limites (comme image) ,puis il l'habitude de montrer le contenu de mon ou il l'habitude de montrer mon contenu à l'intérieur du cadre.Pourquoi?S'il vous plaît aider moi.En vous remerciant.

source d'informationauteur h999