graphics - Problems with CALayer not properly overlaying parent UIImageView's image property -


stackoverflow'ers!

i have been trying core animation integration working in application , find myself screaming in frustration @ problems have arisen...

i trying to:

make view has background image covers entire iphone screen (this image .png file) , draw on top of image using custom core graphics drawing code.

i have tried: a) making uiimageview, setting it's self.image property background .png file, drawing custom uiimage object core graphics code, , setting uiimage contents of uiimageview's associated calayer.

b) making uiimageview or uiview , setting background colour this:

self.backgroundcolor = [uicolor colorwithpatternimage:[uiimage imagenamed:@"myimage.png"]]; 

and putting custom drawing code view's drawrect: method.

c) making uiview, setting calayer's contents background image file, adding calayer sublayer uiview's associated layer, , importing image drawn custom core graphics code , setting image contents sublayer's contents.

none of above methods work.

sometimes custom drawn graphic no background, background no custom drawn graphic on top of it... either way, can't seem custom drawn graphic draw on top of background image.

i have tried having 2 views: 1 background image , 1 custom drawn content, layering 1 on other subviews of main window, , works fine.

however, consider implementation inelegant, , refuse believe there no way have both images attached 1 class...

i open suggestions working.

please note: have messed around relevant view's , calayer's opacity values, , seems consistently absolutely jack all.

also please note: have custom uiimage drawn core graphics functions inside of uigraphicsbeginimagecontext(size) , saved uiimage reference drawn using [path fill] , [path stroke] commands, -that- represents custom drawing, , other thing have uiimage created associated .png file entire size of screen , supposed background image.

thanks or insight guys might able offer! happy coding!

j-rock


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -