objective c - When I set the anchor point, my image is not loading -


i have uiview on loading image view sub view. image showing when doesn't set anchor point whenever set anchor point image not showing .i have added quartzcore frame work also.

i adding code below

cgrect apprect=cgrectmake(0, 0, 1024, 768); uiview *containerview = [[uiview alloc] initwithframe:apprect1]; containerview.backgroundcolor = [uicolor whitecolor]; [self.view addsubview:containerview];  handleview1= [[uiimageview alloc] initwithimage:[uiimage imagenamed:@"large.gif"]]; [handleview1 setalpha:1]; //[handleview1 setframe:cgrectmake(390, 172.00, 56.00, 316.00)]; handleview1.userinteractionenabled = yes; handleview1.layer.anchorpoint=cgpointmake(490.0, 172.0); [containerview addsubview:handleview1]; 

the problem values use anchorpoint. don't set points position of frame values. let me quote apple:

the anchorpoint property cgpoint specifies location within bounds of layer corresponds position coordinate. anchor point specifies how bounds positioned relative position property, serving point transforms applied around. it expressed in unit coordinate system-the (0.0,0.0) value located closest layer’s origin , (1.0,1.0) located in opposite corner.

enter image description here

have @ layer geometry , transforms in core animation programming guide more details.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -