• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Why!, UIPopOver with UINavigationController autoresizes after pushing a viewcontroller in the navcontroller.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why!, UIPopOver with UINavigationController autoresizes after pushing a viewcontroller in the navcontroller.


  • Subject: Why!, UIPopOver with UINavigationController autoresizes after pushing a viewcontroller in the navcontroller.
  • From: Gustavo Adolfo Pizano <email@hidden>
  • Date: Wed, 5 Jan 2011 12:49:16 +0100

Hello all.

Ok so this is driving me crazy already.

I have a UINavigationViewController with a UIPopOver which Im
initializing like this:

		bc_backgroundScrollChooser = [[BeCreativeBackgroundChooserFirstLevel
alloc] initWithNibName:@"BCScrollChooser" bundle:nil];
		bc_backgroundScrollChooser.title = @"Backgrounds Categories";
		CGSize s = self.view.frame.size;
		CGRect frame = bc_backgroundScrollChooser.view.frame;
		s.height = 244;
		frame.size = s;
		frame.origin = CGPointZero;
		bc_backgroundScrollChooser.view.frame = frame;
		bc_backgroundScrollChooser.sizeForPopUp = s;
		navigationBackgroundController = [[UINavigationController alloc]
initWithRootViewController:bc_backgroundScrollChooser];
		navigationBackgroundController.navigationBar.barStyle = UIBarStyleBlack;
		navigationBackgroundController.delegate = self;
		navigationBackgroundController.contentSizeForViewInPopover = s;
		bc_bgPopOver = [[UIPopoverController alloc]
initWithContentViewController:navigationBackgroundController];

When the user selects an item from the bc_backgroundScrollChooser I
push the second level chooser with more options:

                bc_secondLevelBackgroundScroller = [[BCScrollChooser
alloc] initWithNibName:@"BCScrollChooser" bundle:nil];
		bc_secondLevelBackgroundScroller.title = [[bcName
componentsSeparatedByString:@"-"] objectAtIndex:0];
                CGSize s = bc_secondLevelBackgroundScroller.view.frame.size;
	        CGRect f = self.view.superview.bounds;
	        s.width = f.size.width;
	        s.height = 244;
	        f.size = s;
	        bc_secondLevelBackgroundScroller.view.frame = f;
	[bc_secondLevelBackgroundScroller createThumbScrollViewIfNecessary];
	[navigationBackgroundController
pushViewController:bc_secondLevelBackgroundScroller animated:YES];
	navigationBackgroundController.contentSizeForViewInPopover = s;

The behavior is... when i first displayt the popover, the popoiver has
the proper size and the navcontroller also, once I tap something in
the root controller the navcotroller pushes the second level scroller
but right after it pushes it the UIPopOver resizes to a smaller with
and a bigger height, (like 30px more).

I have tried setting the  contentSizeForViewInPopover for the
bc_backgroundScrollChooser and the bc_seconLevelBackgroundSchooser
also and nothing same behavior.
Also I tried setting the UIPopver's contentsize after or before
pushing the second level controller,

What am I doing wrong.?

Please any help would be very much appreciate it.

Thx

Gustavo
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: WebKit: how to handle downloadable files?
  • Next by Date: Re: WebKit: how to handle downloadable files?
  • Previous by thread: Re: WebKit: how to handle downloadable files?
  • Next by thread: Stupid png icons
  • Index(es):
    • Date
    • Thread