objective c - UIScrollView - transparent PNG sliding over an image background -


trying png transparency appear in uiscrollview. instead of transparent black now. tried set view.opaque = no, , view.backgroundcolor = [uicolor clearcolor] no avail.

rootviewcontroller has image background set

self.view.opaque = no;     self.view.backgroundcolor = [uicolor colorwithpatternimage:[uiimage imagenamed:@"appbackground.png"]]; 

rootviewcontroller has uiscrollview load other 2 uiviewcontroller views (leftscreen, centralscreen) into:

cgrect frame = scrollview.frame; frame.origin.x = 0;   frame.origin.y = 0; leftscreen.view.frame = frame; [scrollview addsubview:leftscreen.view];  frame.origin.x = frame.size.width; frame.origin.y = 0; centralscreen.view.frame = frame; [scrollview addsubview:centralscreen.view]; 

the centralscreen.view has 24bit transparent png background set in uiviewcontroller with

self.view.opaque = no;     self.view.backgroundcolor = [uicolor colorwithpatternimage:[uiimage imagenamed:@"homepagetext.png"]]; 

in end centralscreen background png has black transparency should be. recommendations/hints on how fix this? thanks!

you should not use backgroundcolor that, 'cause lost control on how image draw (i.e.: can't resize it). suggest put uiimageview "background" (add use sendsubviewtoback:).


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -