Reputation: 662
My popover is not getting properly sized while presenting with ios 7.03.
I'm Trying like
{
...
ClassObj *mail = [...];
[mail.view setFrame:CGRectMake(0, 0, 320, 216)];
[mail setContentSizeForViewInPopover:CGSizeMake(320,256)];
[refinePopover presentPopoverFromRect:sender.frame inView:[sender superview]
permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
[mail setContentSizeForViewInPopover:CGSizeMake(320,256)];
...
}
And in ClassObj class i'm setting frame and size in viewwill/didApear method
{
[self setContentSizeForViewInPopover:CGSizeMake(320,256)];
[self.view setFrame:CGRectMake(0, 0, 320, 216)];
}
I'm plying more on this please let me know if you have any suggestion, Thanks in Advance. :)
Upvotes: 1
Views: 77
Reputation: 2310
You create a property of UIPopOverController
Object in your ClassObj
and then assign that popoverController from that class where you are creating Your actual popover.
mail.popoverController = refinePopover;
now in your ClassObj in viewwill/didApear method add this code with 0.1 delay.
[popoverController setPopoverContentSize:CGSizeMake(320, 256)];
hope this will help you.
Upvotes: 2