Kanjariya-IOS
Kanjariya-IOS

Reputation: 662

popover size issue with ios 7.0.X, its not getting while loading popover

My popover is not getting properly sized while presenting with ios 7.03. image for ios 7.0.3

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. :) ios 7.1

Upvotes: 1

Views: 77

Answers (1)

Bhupesh
Bhupesh

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

Related Questions