iphone - UITableView within UIScrollView surpassing bounds -


i've had growing headache last couple days. i'm trying add uitableviews scroll view, , page through respective tables (like twitter's app, example). use macros screen's frame can compatible 3.5 , 4 inch screens:

#define screen_x 0 #define screen_y 0 #define screen_width [[uiscreen mainscreen] bounds].size.width #define screen_height self.view.bounds.size.height #define screen_frame cgrectmake(screen_x, screen_y, screen_width, screen_height) 

i make instance of uiscrollview so:

scroll_view = [[uiscrollview alloc] initwithframe:screen_frame]; scroll_view.backgroundcolor = [uicolor clearcolor]; scroll_view.contentsize = cgsizemake(screen_width * 3, screen_height); scroll_view.bounds = screen_frame; scroll_view.maximumzoomscale = 1.0; scroll_view.minimumzoomscale = 1.0; scroll_view.delegate = self; scroll_view.bounces = false; scroll_view.scrollstotop = no; scroll_view.clipstobounds = true; scroll_view.pagingenabled = true; [self.view addsubview:scroll_view]; 

i make instance , initialize table so:

table = [[example_table_view alloc] init_with_frame:cgrectmake(screen_width, 0, screen_width, screen_height) and_array:[information objectforkey:@"information"]]; table.clipstobounds = true; //attempt solve table.bounds = broadcasts_table.frame; //attempt solve table.contentsize = scroll_view.contentsize; //attempt solve [scroll_view addsubview:table]; 

the issue is, while scroll view's frame , bounds seem correct macros, table insists on existing (vertically) outside of scrollview, partially hidden uinavigationbar , uitabbar (it may important note using both in application).

if sees i'm doing wrong, i'd appreciate much. thanks!

the last time checked twitter app used uipagevuewcontroller swipe between views.

not scroll view.

you might want try experimenting first.

it's lot kinder on memory usage also.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -