I am showing a Popover from a Button which is placed in the header of a UITableView.
-(void) addButtonClicked:(id)sender{
[addPopOverVC setPopoverContentSize:CGSizeMake(POPOVER_WIDTH, numberOfRowsInTable * addOptionsTable.rowHeight)];
[addPopOverVC presentPopoverFromRect:[sender bounds] inView:sender
permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
addPopOverVC.passthroughViews = nil;
}
the app freezes on the second line (when I call method presentPopoverFromRect) without any warning / error in debugger. Also when I try to debug it the step over just disappears at that line and app becomes unresponsive as if it never returned back.
I havent seen such a behavior before . addPopOverVc is a UIPopoverViewController. all parameters have values which are not nil .
1) The
senderin this case was the button who triggered the click event. You shouldn’t use the button to present the popover in, but instead the real view where you want to present the popover.2) Are you sure
addPopOverVCwas initialized and retained correctly?cheers,
anka