Reputation: 147
in iOS 7 view can be under the NavigationBar and statusBar
How can I discover, where (in what CGPoint) UIViewController become visible.
So on image you can see, that green View appear from the top of my controller.view. I want this view appear from the bottom of NavigationBar. How can I determine, what CGPoint in controller.view equal to bottom of NavigationBar. So View can begin not from top of screen, and NavigationBar will be disappear sometimes, so coordinate of appearing of greenView can change, that's why I need know coordinate of bottom of NavigationBar in viewcontroller.view coordinate system
Upvotes: 2
Views: 304
Reputation: 1179
You can add following code of method in your viewDidLoad method and try
if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) {
self.edgesForExtendedLayout = UIRectEdgeNone;
}
Upvotes: 2
Reputation: 944
The topLayoutGuide
in your Storyboard is made for that. You can also access that programatically (in the view controller) by self.topLayoutGuide
.
Upvotes: 0