ios 7 UiView frame issue
You should use below line for fix it in your view. self.edgesForExtendedLayout = UIRectEdgeNone;
You should use below line for fix it in your view. self.edgesForExtendedLayout = UIRectEdgeNone;
Once you know it, it’s fairly simple: self.navigationController.navigationBar.tintColor = [UIColor blueColor]; self.navigationController.navigationBar.alpha = 0.7f; self.navigationController.navigationBar.translucent = YES; The translucent property seems only to determine wether the main view should be visible under the navigation bar, and resizes the view appropiately.
Actually it is pretty easy to do. You just need to connect navigation isNavigationBarHidden property with status bar. Objective-C – (BOOL)prefersStatusBarHidden { return self.navigationController.isNavigationBarHidden; } Swift <= 2.3 override func prefersStatusBarHidden() -> Bool { return navigationController?.navigationBarHidden ?? false } Swift 3.0 override var prefersStatusBarHidden: Bool { return navigationController?.isNavigationBarHidden ?? false } And be sure you … Read more
Try this Recommended self.navigationItem.leftBarButtonItem.enabled = NO; self.navigationItem.rightBarButtonItem.enabled = NO; Or Simply Disable by on Edge case self.view.window.userInteractionEnabled = NO; Update: Recently Apple doesn’t allow the back button to enable / disable. Instead of that we can hide it. self.navigationItem.hidesBackButton = YES;
This works. Give frame at the time of initialisation UIView *iv = [[UIView alloc] initWithFrame:CGRectMake(0,0,32,32)]; [iv setBackgroundColor:[UIColor whiteColor]]; self.navigationItem.titleView = iv;
Try this: self.navigationController.navigationBar.titleTextAttributes = [ NSFontAttributeName: UIFont(name: “CaviarDreams”, size: 20)!] Edit: Now, UIFont must be unwrapped to be able to be used here. Swift 5 (+ safe handling of optional UIFont) self.navigationController?.navigationBar.titleTextAttributes = [ NSAttributedString.Key.font: UIFont(name: “Caviar-Dreams”, size: 20) ?? UIFont.systemFont(ofSize: 20)]
Click on the controller that has the top bar navigate to the properties bar on the right hand side of Xcode. There is a drop down labeled Top Bar (as shown above) change this drop down to none.
This is better: viewController.hidesBottomBarWhenPushed = YES; [self.navigationController pushViewController:viewController animated:YES]; You have to set hidesBottomBarWhenPushed = YES on the controller you are going to push into the view…