I have the code below to display popover with tableview and it works perfectly.
The tableview displays 13 numbers and I can scroll and see the same but when I relea
Use autoresizing correctly!
Popover - has content size
popoverView
- its initial size should be the same as popover's content size and use
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight
tblViewMenu
- its initial size should be the same as the size of its ancestor (popoverView
), again, use UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight
Your table is not scrolling because it is so big that it doesn't needs scrolling. Only the popover is clipping it.
CGSize contentSize = CGSizeMake(320, 320);
UIView* popoverView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, contentSize.width, contentSize.height)];
popoverView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
UITableView *tblViewMenu = [[UITableView alloc]initWithFrame:popoverView.bounds];
tblViewMenu.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
popoverContent.contentSizeForViewInPopover = contentSize;