0

When I pass my UINavigationController to UIPopOver and set its popOverContentSize property, it remains in effect for only first view. When I navigate to next view, the popOverContent size again expands to full view which is unwanted. How can I restrict the constant size of popOver for all views in navigation controller?

- (void)selectTextStyle:(id)sender { DJTextStyleMasterViewController *textStyle = [[DJTextStyleMasterViewController alloc] init]; self.navController = [[UINavigationController alloc] initWithRootViewController:textStyle]; UIPopoverController *popOver = [[UIPopoverController alloc] initWithContentViewController:self.navController]; [popOver setDelegate:self]; [popOver setPopoverContentSize:CGSizeMake(320, 400)]; [popOver presentPopoverFromBarButtonItem:self.textStyleButton permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; [textStyle release]; } 

1 Answer 1

2

within the first view controller in the popover controller you could use this method:

[self setContentSizeForViewInPopover:CGSizeMake(320, 400)]; 

Then the view of the popover (if it isn't manually modified) should be the same also for the next view controller.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks a lot :) It worked but needed to be added in other view controllers to resize. Otherwise wont work

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.