iOS UILabel in scrollview appears as block -


i novice objective-c , developing first app, notification-center widget, compiled "theos" .deb

its pretty straightforward: want create uiscrollview, scroll (horizontally) through multiple pages, added uiimage subviews scrollview. on 1 page add uibuttons uiimageview - works!

i tried, testing, uislider on - works!

all elements shown intended , can controlled, when add labels, no matter page, shows me white filled rect on left edge of uiimageview:

buttons vs. buggy label

the code simple as:

creating scrollview in -(void)init

scrollview = [[uiscrollview alloc] initwithframe:cgrectmake(0, 0, view_width, view_height)]; scrollview.pagingenabled = yes; scrollview.userinteractionenabled = yes; scrollview.autoresizingmask = uiviewautoresizingflexiblewidth; scrollview.showshorizontalscrollindicator = no; 

creating page subview in -(void)loadfullview

page0 = [[uiimageview alloc] initwithimage:stretchablebgimg]; page0.frame = cgrectmake(pageview_offset, 0.0f, view_width-2*pageview_offset, view_height); page0.autoresizingmask = uiviewautoresizingflexiblewidth; page0.userinteractionenabled = yes; 

somewhere later:[scrollview addsubview:page0]; [_view addsubview:scrollview];

creating label , adding page

uilabel* label = [[uilabel alloc] initwithframe:cgrectmake(pageview_offset,0,view_height/2,view_width-2*pageview_offset)]; label.text = @"message"; [page0 addsubview:label]; [label release]; 

what missing? appreciated!


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -