Reputation: 357
i am using a UIPopoverController
.
In this popover i am loading a custom view which has a navigation bar and a table view. When i present the popover it only shows the navigation bar and table view is not shown. Please tell me how to resolve the issue.
Upvotes: 0
Views: 956
Reputation: 357
I found a way. Actually i was unable to give the permittedArrowDirections parameter because the direction was not fixed. So I passed a "NO" in the parameter and it works. Thanks everyone for their help.. :)
Upvotes: 1
Reputation: 20551
just check that you Add UITableView
as a SubView of your custom view or not..
also try with this code...
UIViewController *viewTemp = [[UIViewController alloc]init];
viewTemp.view.frame = CGRectMake(0, 0, 300, 400);
yourTable.frame = CGRectMake(0, 0, 300, 400);
[viewTemp.view addSubview:yourTable];///Add Table as a SubView of your custom view
UIPopoverController *popTemp = [[UIPopoverController alloc]initWithContentViewController:viewTemp];
[popTemp presentPopoverFromRect:CGRectMake(810.0, 35.0, 300, 210) /// just set frame which from you want to show this popover view ... you can set like yourButton.frame;
inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];
CGSize size = {300 , 400};// give your size which you want...
popTemp=nil;
Upvotes: 0