Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

preferredContentSize not working instead of contentSizeForViewInPopover

I am working on project where i want to make my app compatible with IOS7.

self.contentSizeForViewInPopover = CGSizeMake(90, 1 * 65 - 1);

this method is deprecated from ios7

new method is self.preferredContentSize= CGSizeMake(90,1*65-1);

but i am not getting proper UIenter image description here

but when i am changing with ios7 compatiable method my view is like this

with ios7 method i am getting this enter image description here

like image 978
Anil Prasad Avatar asked Mar 06 '14 10:03

Anil Prasad


1 Answers

This is given in apple documentation:

This property allows direction manipulation of the content size of the popover. Changing the property directly is equivalent to animated=YES. The content size is limited to a minimum width of 320 and a maximum width of 600.

@property (nonatomic) CGSize popoverContentSize;

- (void)setPopoverContentSize:(CGSize)size animated:(BOOL)animated;

I have implemented to handle the content size of popover like this & its working:

self.popController.popoverContentSize = CGSizeMake(430, 460);
like image 151
Sharma Avatar answered Nov 15 '22 18:11

Sharma