• 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
Re: overlapping status bar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: overlapping status bar


  • Subject: Re: overlapping status bar
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sat, 30 Nov 2013 13:20:04 +0700

On 30 Nov 2013, at 00:42, Kyle Sluder <email@hidden> wrote:

>> On Nov 29, 2013, at 1:18 AM, "Gerriet M. Denkmann" <email@hidden> wrote:
>>
>> The problem: the status bar is visible (as it should be) but it overlaps both view a and b, which looks ugly.
>> Is there any way to tell these views to move down a little bit (using autolayout)?
>
> UIViewController.topLayoutGuide.

in viewDidLoad of my ViewController I added:

id <UILayoutSupport>  topGuide = self.topLayoutGuide;
NSLog(@"%s topGuide: %@, length: %g, preferHidden: %d",__FUNCTION__,
			 topGuide, topGuide.length, self.prefersStatusBarHidden);

which prints:
topGuide: <_UILayoutGuide: 0x10f433230; frame = (0 0; 0 0); hidden = YES; layer = <CALayer: 0x10f44a4d0>>, length: 0, preferHidden: 0

"hidden = YES" seems strange as I can clearly see the statusBar (the thing with Carrier, Clock and Battery on top). "length = 0" rimes with "hidden = YES" but not with reality.

Not surprisingly, adding:
NSLayoutConstraint *newOne =	[ NSLayoutConstraint	constraintWithItem:	topGuide
														attribute:			NSLayoutAttributeBottom
														relatedBy: 			NSLayoutRelationEqual
														toItem:				self.view
														attribute:			NSLayoutAttributeTop
														multiplier:			1
														constant:			0
								];
[ self.view addConstraint: newOne ];

has no effect at all.

By the way: my ViewController is part of a UISplitViewController. The same view works very nicely when part of a UINavigationController.

iOS 7.0.4

Kind regards,

Gerriet.


_______________________________________________

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


References: 
 >overlapping status bar (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: overlapping status bar (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: overlapping status bar
  • Next by Date: ToolTips for Matrix Cells
  • Previous by thread: Re: overlapping status bar
  • Next by thread: MKMapView, screen grabs and other discussions
  • Index(es):
    • Date
    • Thread