Menu
  • HOME
  • TAGS

UISplitViewController's detail view push error

ios,iphone,uinavigationcontroller,uinavigationbar,uisplitviewcontroller

The culprit causing this navigation peculiarity in my project was due to an extension I downloaded from SO user called UIViewController+BackButtonHandler. This handler intercept the navigation back button so I can get the chances to do extra work when user press back. This category extension code overrides navigationBar:shouldPopItem: causing the...

Changing Navigation Controller colour swift

ios,swift,uinavigationbar

If you want to set the background color of the nav bar: UINavigationBar.appearance().barTintColor = UIColor.redColor() Note RGB values are from 0.0 to 1.0 so you have to divide them by 255 or your color will just be white. Next tint: UINavigationBar.appearance().tintColor = UIColor(red: 73.0 / 255.0, green: 155.0 / 255.0,...

Status Bar turning completely black when using clipsToBounds = YES in iOS8. How do I change this?

cocoa-touch,ios8,uinavigationbar,statusbar

Do not set the clipsToBounds property to YES. The way extended bars work is the layer is drawn beyond its bounds until under the status bar. You have two options here. One is to remove the separator using runtime trickery, which I have explained how to do in this answer....

iOS Navigation Bar Title View Buttons

ios,objective-c,uinavigationbar

You can set the navigation bar title to be a UIView with self.navigationItem.titleView. For example: UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] initWithItems:@[@"New", @"Hot"]]; [segmentedControl sizeToFit]; // Configure your segmentedControl to your liking... self.navigationItem.titleView = segmentedControl; Also, can take a look at this one: UINavigationBar with buttons as title. Basically, you can...

Dynamically change NavigationBar Back Button Text from presented ViewController

ios,objective-c,uinavigationbar,back-button,uinavigationitem

First of all, UINavigationItem.backBarButtonItem for view controller A is not the left bar button when A is on top of the navigation stack, it is the left bar button when A is second-top of the navigation stack. That is to say, you push A, and then push B, when B...

Navigation Buttons Lost in Storyboard App

ios,objective-c,iphone,uinavigationbar

What's probably happening is the the view controller the buttons navigate to is breaking the navigation stack; the destination view controller to which the app segues after pressing, say "Any Category," is using the navigation controller in a non-standard way. Take a look at the destination view controller. If it's...

Matching the color of the 'transparent' navbar

ios,uikit,uinavigationbar

I'm looking at this same problem now and am using the layer inspector to look at the navigation bar. As it turns out, the UINavigationBar actually has two colored layers in it. One of them is based on your color, and one is a semitransparent near-white layer. Have a look...

Hide status bar whenever nav bar is hidden - SWIFT iOS8

swift,ios8,uinavigationbar

Sorry if this answer is a little late, but here is one way to do it. Use the prefersStatusBarHidden() method within your view controller. override func prefersStatusBarHidden() -> Bool { if self.navigationController?.navigationBarHidden == true { return true } else { return false } } Basically says that when the Nav...

Implement Objective C code in Swift [closed]

ios,objective-c,swift,uinavigationbar

func navigationShouldPopOnBackButton() -> Bool { if(needsShowConfirmation) { // Show confirmation alert // ... return false // Ignore 'Back' button this time } return true // Process 'Back' button click and Pop view controller } ...

iOS:Help Blur screen on the top of home view

ios,objective-c,uitabbarcontroller,uinavigationbar

This is what I have done for walkthrough in my application. You can download this FXBlurView library from here: https://github.com/nicklockwood/FXBlurView In my .h file #import "FXBlurView.h" IBOutlet UIView *viewWalkThrough; FXBlurView *overlayView; In my .m file #define SYSTEM_SCREEN_SIZE [[UIScreen mainScreen] bounds].size #define kProfileWalkthrough @"ProfileWalkthrough" if (![[[NSUserDefaults standardUserDefaults] valueForKey:kProfileWalkthrough] boolValue]) { [[NSUserDefaults...

Hide back button in navigation bar with hidesBackButton in Swift

ios,swift,ios8,uinavigationbar

Try adding this: let backButton = UIBarButtonItem(title: "", style: UIBarButtonItemStyle.Plain, target: navigationController, action: nil) navigationItem.leftBarButtonItem = backButton ...

Set title (color/font)of UINavigation controller at the same time (strange behaviour)

ios,swift,ios8,uinavigationbar

By doing it twice you are undoing the first one. You need to do it like this... UINavigationBar.appearance().titleTextAttributes = [NSFontAttributeName: UIFont(name: "Avenir Next", size: 20)!, NSForegroundColorAttributeName: UIColor(red: 93/255, green: 173/255, blue: 173/255, alpha: 1)] ...

Changing Color of Navigation Bar Independently

ios,swift,uinavigationbar

To set all UINavigationBar instances at once to the same color do this: UINavigationBar.appearance().barTintColor = UIColor.greenColor() To set per instance (as you need), try this: self.navigationBar.tintColor = UIColor.blueColor() self.navigationController.navigationBar.translucent = false ...

Bad frame for custom UINavigationBar

ios,swift,uinavigationbar

I don't think you should override UINavigationBar. The properties you're trying to customize are already exposed by the UINavigationController so you can change that in your ViewController using self.navigationController.

Can't set image in UINavigationBar to the center

ios,objective-c,uinavigationbar

The titleView is centered between the left and right items. It's not centered on the nav bar. One possible solution would be to add a dummy left bar button item of the same size as your right bar button item. This will force the titleView to the center....

iOS PopoVer NavigationBar don't show BarTintColor

uinavigationbar,uitoolbar,tint,bartintcolor

The solution to this issue is to set the color-values manually in the popping-up ViewController again for iOS 7. self.navigationController.toolbar.barStyle = UIBarStyleBlackTranslucent; [self.navigationController.toolbar setTintColor:[UIColor whiteColor]]; [self.navigationController.toolbar setBarTintColor:[UIColor colorWithRed:255.0/255.0 green:167.0/255.0 blue:0.0/255.0 alpha:1.0]]; self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent; [self.navigationController.navigationBar setTintColor:[UIColor...

How can I change the font of the back button for my navigation bar?

ios,swift,cocoa-touch,uinavigationcontroller,uinavigationbar

Just tested your code and it seems the reason that line is returning nil is actually because name: "FONTNAME" returns nil. So if you set that name attribute to a valid font name, the code should run without an error -- even if navigationController?.navigationItem.leftBarButtonItem is explicitly set to nil. But...

Swift, Navigation bar should not be shown on the login screen

swift,uinavigationcontroller,uinavigationbar

Login Screen ViewDidload write following line navigationController?.setNavigationBarHidden(true, animated: true) override func viewWillAppear(animated: Bool) { super.viewWillAppear(animated) navigationController?.setNavigationBarHidden(true, animated: true) } ...

Nav Bar Item in XIB that Presents a StoryBoard Tab Bar Root View Controller Segue

ios,objective-c,xcode,uitabbarcontroller,uinavigationbar

Since you have two tab bar controllers in your application. I don't think it is a good idea to use navigation controller (push/pop) to manage the transition between them. Try with presentViewController. When the chat button is pressed, show the second tab view controller. - (IBAction)chatButtonPressed:(id)sender { ChatTabBarController *chatTabView =...

How to display a UIView which overlaps the UINavigationBar

ios,objective-c,uiview,uinavigationbar,mainscreen

You can add view as a subview to the window's or navigation controller's view. [self.navigationController.view addSubview:yourView]; OR [[[[UIApplication sharedApplication] delegate] window] addSubview:yourView]; Create view's delegate to remove it from superview whenever needed...

What method actually got called when we set self.navigationItem.hidesBackButton = YES;

ios,uinavigationbar,uinavigationitem,runloop

From Apple Document The View Drawing Cycle The UIView class uses an on-demand drawing model for presenting content. When a view first appears on the screen, the system asks it to draw its content. The system captures a snapshot of this content and uses that snapshot as the view’s visual...

EXC_BAD_ACCESS when using UIPageControl in navigation bar

ios,objective-c,uinavigationcontroller,uinavigationbar,uipagecontrol

Looks like you are trying to access a deallocated object. Try enabling zombie objects: Edit your Target Scheme Select 'Run' on the left menu Check the checkbox 'Enable Zombie Objects' This will not release any objects, so make sure to disable it after debugging....

UINavigationBar custom color with Embeded UInavigatonController in storyboard

ios,xcode,uinavigationcontroller,uinavigationbar

In your view controller add this in your viewDidLoad method: [[[self navigationController] navigationBar] setBarTintColor:[UIColor yourColor]; if your navigation controller is your root view controller (first view controller in storyboard) you can use this in app delegate: [[(UINavigationController*)self.window.rootViewController navigationBar] setBarTintColor:[UIColor yourColor]]; ...

What to subclass (if anything) to customization UINavigationBar's appearance?

ios,ipad,uinavigationcontroller,uinavigationbar

There are a few ways that you could do this, although the only reference I could provide for choosing one over the other is the example that Apple gives. The Navigation Controller and it's UI Bar are very customizable, there is almost nothing that can't be changed (from a UI...

UINavigationBar title text partially appears on screen

ios,ios8,autolayout,uinavigationbar

You can try to obtain the screen width this way too: CGRect frame = (CGRect){0,0,CGRectGetWidth([[UIScreen mainScreen]bounds]),64); Perhaps it will fix your problem....

How to customize iOS UINavigationItem?

ios,objective-c,uinavigationbar,uinavigationitem

In the case of nav bar buttons, i guess you could drag and drop a barButtonItem into the nav bar using the storyBoard. Then you can set the image property of the barButtonitem. Also note that the images you use for this should be the exact dimensions as it wont...

How to set different navigationbar color for different UIViewcontroller in xib?

ios,objective-c,uiviewcontroller,uinavigationbar,uicolor

Try [[UINavigationBar appearance] setBarTintColor: [UIColor redColor]]; Or, on iOS 6, [[UINavigationBar appearance] setTintColor:[UIColor redColor]]; If you have a navigation controller as rootViewController, get it with: UINavigationController* nc = (UINavigationController*)[[[UIApplication sharedApplication] delegate] window].rootViewController; And then set the color: [nc.navigationBar setBarTintColor:[UIColor redColor]]; And if you want to change the color in each...

How to align custom UINavigationBar title (UILabel )in middle (iOS)

ios,objective-c,uiview,uilabel,uinavigationbar

Add below two lines before addSubview lines.. patientNameLabel.center = CGPointMake(titleView.frame.size.width/2, 0); subTitleLabel.center = CGPointMake(titleView.frame.size.width/2, 25); Add Below Code & see UIView *titleView = [[UIView alloc] initWithFrame:CGRectMake(0,0,self.view.frame.size.width,50)]; UIFont * customFont = [UIFont fontWithName:@"Helvetica Neue" size:19]; //custom font NSString * text [email protected]"Nilesh Patel"; UILabel *patientNameLabel; if([text length]>15){ patientNameLabel = [[UILabel alloc]initWithFrame:CGRectMake(0,...

How to make status bar translucent?

objective-c,uinavigationbar

It is actually what you need to completely remove default header background (statusBar + navigationBar) and set your own: // ViewController.m self.navigationController.navigationBar.backgroundColor = [UIColor clearColor]; self.navigationController.navigationBar.tintColor = [UIColor yourColor]; // Set your tint color self.navigationController.navigationBar.shadowImage = [UIImage new]; self.navigationController.navigationBar.translucent = YES; self.navigationController.navigationBar.opaque = NO; [self.navigationController.navigationBar...

Adjust scroll view's inset within a child view controller

ios,uiscrollview,uinavigationbar

The UINavigationController adjust its child view controller's topLayoutGuide automatically. In your case it is not being propagated down far enough. If you make sure this topLayoutGuide makes it down to your table view controller then you won't have to set the contentInset manually. Also, your view controller hierarchy seems overly...

Create Back Button with Storyboards

xcode,uitableview,swift,uitabbarcontroller,uinavigationbar

The UINavigationController has the back functionality. How to go back one view in UINavigationController?. Here is some old tutorial on how to combine that with a tabbarcontroller. should still be the same principles....

Navigation Bar not showing title

ios,uinavigationbar

I've been able to set titles in the delegate as follows: 1.) Create view controllers 2.) Set those titles 3.) Then create UINavigationControllers and assign view controllers there self.firstViewController = [[FirstViewController alloc] initWithNibName:nil bundle:nil]; self.secondViewController = [[SecondViewController alloc] initWithNibName:nil bundle:nil]; self.thirdViewController = [[ThirdViewController alloc] initWithNibName:nil bundle:nil]; self.fourthViewController = [[FourthViewController alloc]...

Custom Back Button for Navigation Bar

ios,iphone,uinavigationcontroller,uinavigationbar,uinavigationitem

Try this code instead.. Here a button is first created , its title and image is set and then it is set as left bar button item of navigation controller. UIButton *backBarButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 100, 29)]; [backBarButton setTitle:@" Log Out" forState:UIControlStateNormal]; [backBarButton setImage:[UIImage imageNamed:@"leftarrow_ipad.png"] forState:UIControlStateNormal]; [backBarButton...

How to set the background of UINavigationBar in Objective-C ?

ios,objective-c,uinavigationbar

The code you are using is old, starting from iOS 7 you could use the below [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"YourImage"] forBarMetrics:UIBarMetricsDefault]; If you provide an image with 44px height, it'll cover the navigation bar only without the status bar, if you provide it with 66px height, it'll cover them both...

UI glitch (black flicker) on right side of navbar during transition

ios,swift,uinavigationbar,uiviewanimation,uinavigationitem

I was able to remove the black UI glitch by removing the animation on all subviews of the navigationbar. I think the problem was with the right UINavigationItem. Here is the code I used: let subviews = (self.navigationController?.navigationBar.subviews as [UIView]) for subview: UIView in subviews { subview.layer.removeAllAnimations() } ...

How can I change the UINavigationBar's background image via Interface Builder in XCode 6

ios,xcode,interface-builder,xcode6,uinavigationbar

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UIImage *navBackgroundImage = [UIImage imageNamed:@"navbar_bg"]; [[UINavigationBar appearance] setBackgroundImage:navBackgroundImage forBarMetrics:UIBarMetricsDefault]; return YES; } ...

IOS - Translucent Navigation Bar over content

ios,xcode,uinavigationcontroller,uinavigationbar

UITableViewController adjusts its content inset so the start of its content begins at the bottom edge of the navigation bar. You can uncheck the view controller's Adjust Scroll View Insets property, to stop the tableView content from being inset. (This will affect both top and bottom bars.)...

UINavigationBar left margin

ios,iphone,uinavigationbar

iOS 8 introduces the concept of layout margins. Each view (UIView and its subclasses) contains a layoutMargins property, which will give you exactly what you want. In addition, you can use layoutMarginsDidChange to listen to changes to the margin to react on margin changes. This method is called after initial...

View under translucent navigation bar?

ios,uinavigationbar

You can place your view controller under the navigation bar. if ([viewController respondsToSelector:@selector(setEdgesForExtendedLayout:)]) { [viewController setEdgesForExtendedLayout:UIRectEdgeAll]; } ...

Pull down menu from Navigation bar

ios,objective-c,menu,uinavigationbar,custom-controls

Would doing something like this work for you? then of course you can just add whatever menu buttons you need to the menu view. UIView * menu; UIButton * activate; int menuHeight; int buttonHeight; -(void)toggleMenu:(UIButton*)sender{ [sender setUserInteractionEnabled:NO]; [self.view bringSubviewToFront:menu]; if (sender.tag == 1000){ [UIView transitionWithView:menu duration:0.3 options:UIViewAnimationOptionCurveEaseInOut animations:^{ CGRect frame...

Slide out animation with navigation bar in swift

ios,swift,animation,uinavigationbar

You might want to use Custom View Controller Transition Custom Transition Worth Reading...

UINavigation Bar being set by a different controller

ios,objective-c,uinavigationbar,title

So hopefully nobody else foolishly runs into this weird error. For some reason the code in my 2nd TableViewController: - (BOOL)prefersStatusBarHidden { return YES; } caused the error...

Color not showing at UINavBar in xcode

objective-c,xcode,uinavigationbar,uicolor

I was using the viewController that is flexible for the ipad and iphone. Now in that viewController I inserted a navigation controller for each viewController. (Which surprisingly xcode lets you do that. And at the time I didn't know it was wrong.) So I set the bar tint color at...

iOS storyboards - UINavigationBar not appearing when I add it

ios,storyboard,uinavigationbar

To add constraints select your navigation bar and click in the icon as in the picture. uncheck "constrain to margins" as you want the navigation bar to snap in the boards of the screen, select the up and left red dots lines and add the value 0 to the drop...

Need to either set status bar to solid color, or add subview to status bar

ios,objective-c,uinavigationcontroller,uinavigationbar,ios7-statusbar

I finally figured it out. This code does work perfectly: self.statusWindow = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 320, 20)]; self.statusWindow.windowLevel = UIWindowLevelStatusBar + 1; self.statusWindow.hidden = NO; self.statusWindow.backgroundColor = [UIColor redColor]; [self.statusWindow makeKeyAndVisible]; The key is, statusWindow cannot just be a local variable. It needs to be an actual property, otherwise...

Why is pressing back removing all the navigation bar information whilst in landscape?

ios,ios8,uinavigationbar,uiinterfaceorientation

I found the problem but I wouldn't really call it an answer. I've got the status bar hidden on the second VC in landscape but when I show it everything resumes fully working.. If I want to hide the status bar i'm having to create a fake back button: UIBarButtonItem...

Black status bar on startup iOS8 using UIPageViewController

ios,uiviewcontroller,ios8,uinavigationbar,uipageviewcontroller

I tried to solve this for ~10 hours before giving up. I finally solved it when I was trying to solve another issue, and found a method that was worth a shot. After setting the delegate for UIPageViewController, just put pageViewController.automaticallyAdjustsScrollViewInsets = NO; ...

Make the navigationbar title clickable swift

ios,swift,uinavigationbar

One more approach to add button as a title of navigation controller. You need to set navigation item title view to your button object Create button object in viewDidLoad() method: var button = UIButton.buttonWithType(UIButtonType.Custom) as UIButton button.frame = CGRectMake(0, 0, 100, 40) as CGRect button.backgroundColor = UIColor.redColor() button.setTitle("Button", forState: UIControlState.Normal)...

Customize the Bottom Bar in NavigationBar Controller

uinavigationbar

Finally i found how: UIToolbar.appearance().barTintColor = UIColor.blackColor() UIToolbar.appearance().tintColor = tintColor

iOS - NavigationBar hide/show

ios,uinavigationcontroller,uinavigationbar,viewwillappear

Finally I have solved this issue. I wrote UINavigationBar hiding code for firstVC in the viewDidAppear method. -(void)viewDidAppear:(BOOL)animated{ [super viewDidAppear:animated]; [self.navigationController setNavigationBarHidden:YES animated:YES]; } ...

nav bar nonresponsive after UIImagePickerController dismissed

ios7,uinavigationcontroller,uinavigationbar,uiimagepickercontroller

I noticed that the log was showing "Unbalanced calls to begin/end appearance transitions for" the launching controller. I was launching the image picker controller immediately from another controller when it appeared. This works OK on iOS 8 but there needs to be a delay on iOS 7. I fixed it...

How to have a better transition between controllers for the navigation bar?

ios,swift,uinavigationbar,uiviewanimationtransition

I found the solution : I used navigationController.setNavigationBarHidden(true, animated: animated) override func viewWillAppear(animated: Bool) { super.viewWillAppear(animated) if let navigationController = navigationController { previousStatusBarHiddenState = navigationController.navigationBar.hidden navigationController.setNavigationBarHidden(true, animated: animated) } } override func viewWillDisappear(animated: Bool) { super.viewWillDisappear(animated) // restore status bar...

Default iOS back bar button item

ios,uinavigationbar,smartface.io

You must assign onSelected event of back item. Can you try this; var leftItem = new SMF.UI.iOS.BarButtonItem({ systemItem : SMF.UI.iOS.BarButtonType.cancel, onSelected : Pages.back() }); this.navigationItem.leftBarButtonItems = [leftItem]; ...

Managing a transition from a normal NavigationBar to a transparent one

ios,objective-c,uinavigationcontroller,uinavigationbar,uinavigationitem

Have you looked into UIViewControllerTransitionCoordinator? Each UIViewController has a transitionCoordinator property you can access to perform tasks that are related to a transition. From the viewWillAppear/viewWillDisappear methods of the UIViewController doing the transition call the animateAlongsideTransition method of the transitionCoordinator: id <UIViewControllerTransitionCoordinator> coordinator = [self transitionCoordinator]; [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>...

UIAppearance for UINavigationBar ios8

objective-c,ios8,uinavigationbar,uiappearance

You can't set buttons via UIAppearance. If you are setting titleTextAttributes on each page (for say, font, size and color), you can do that via the UINavigationBar appearance like this: [[UINavigationBar appearance] setTitleTextAttributes:attributes]; The attributes pointer is a NSDictionary containing your textAttributes (NSFontAttributeName, NSForegroundColorAttributeName etc.)...

Change BarButtonItem Font Using Swift (Xcode 6)

xcode,swift,fonts,navigation,uinavigationbar

If you create and outlet (e.g. @IBOutlet var barButton: UIBarButtonItem!) linked to your UIBarButtonItem, you should be able to change your font type by using setTitleTextAttributes on the outlet. barButton.setTitleTextAttributes([ NSFontAttributeName: UIFont(name: "Arial", size: 12)!], forState: UIControlState.Normal) ...

How to change the uinavigationbar title's position?

swift,ios8,uinavigationbar,material-design

Create a UIView object add UIButton and UILabel in it to show a similar view. Add this custom view into left bar button item of navigation controller. An example screen shot to visualise a custom view and related code: override func viewDidLoad() { super.viewDidLoad() var customView = UIView(frame: CGRectMake(0, 0,...

UITableView in UITableViewController behind navigation controller on initial load

ios,uitableview,swift,uinavigationbar

looking at your other question, I'm wondering if it's the same issue with having the UITabBarController embedded within a UINavigationController. If that's the case, the Just to recap again, the controller hierarchy should be as follows: First UINavigationController -> First UITableViewController Second UINavigationController -> Second UITableViewController Finally, both of the...

scrollView not returning to correct position after keyboard hides

ios,xcode6,uinavigationbar,scrollview

Before any editing begins, you can store your current scrollview.contentInset. Later when editing ends, you can set the same to put it where it belonged. Don't use a hardcode 44. ...

Seperation between navigation bar and table view disappear

ios,uitableview,interface-builder,uinavigationbar,uistoryboard

You have to choose your first view controller and from top menu you must select Editor -> Embed In -> Navigation Controller This is how you add Navigation Controller to a View Controller. Also you have to use delegation for passing data back from the pushed view controller. ...

On Click of navigation bar button, how to call method defined in UIview [closed]

objective-c,uiview,uiviewcontroller,uinavigationbar

Yes, its possible. Just set target and action for that bar button and you're done. Or if that method is some outside view (or class) you may call self targeted method inside that view can call outsided view (or class) method. UIBarButtonItem *btn = [[UIBarButtonItem alloc] initWithTitle:@"Tap Me" style:UIBarButtonItemStyleBordered target:self...

Fill Color gap between Navigation bar and Carrier details in Swift

swift,ios8,uinavigationbar,uinavigationitem

Need to add Navigation Controller which should be tied to View Controller, then the result will be achieved.

add button navigationbar center

ios,uinavigationbar

The titleView is nil by default so your code doesn't do anything. Change the code to: self.navigationItem.titleView = button; This sets your button as the titleView....

navigationBar setBackgroundImage not working

ios,objective-c,background,uinavigationbar

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UIImage *navBackgroundImage = [UIImage imageNamed:@"navbar_bg"]; [[UINavigationBar appearance] setBackgroundImage:navBackgroundImage forBarMetrics:UIBarMetricsDefault]; return YES; } ...

UINavigation Bar to turn transparent as user navigates deeper

ios,objective-c,swift,uinavigationcontroller,uinavigationbar

Add the following to viewDidLoad() navigationController?.navigationBar.setBackgroundImage(UIImage(), forBarMetrics: UIBarMetrics.Default) navigationController?.navigationBar.shadowImage = UIImage() navigationController?.navigationBar.translucent = true This will persist to the other views that you push through the navigation hierarchy so make sure you make changes to their viewDidAppear() or load. Or you can take care of this in your current view...

self.navigationController.navigationBar.translucent = NO; create an extra gap after navigationBar

ios,objective-c,uinavigationcontroller,uinavigationbar

From iOS7 if you use a translucent bar ( in UINavigationController or UITabbarController) the hosted view controller has as default behavior to extend under them. If you say to set the bar as translucent the color of it it will be a combination of the view under it and bat...

how to add two multiple UIBarButtonItems on right side of Navigation Bar?

ios,xcode,swift,uinavigationbar,uibarbuttonitem

Use this in swift var editImg : UIImage = UIImage(named: "plus")! var searchImg : UIImage = UIImage(named: "search")! var editBtn : UIBarButtonItem = UIBarButtonItem(image: editImg, style: UIBarButtonItemStyle.Plain, target: self, action: Selector("editBtnPressed:")) var searchBtn : UIBarButtonItem = UIBarButtonItem(image: searchImg, style: UIBarButtonItemStyle.Plain, target: self, action: Selector ("searchBtnPressed:")) var buttons : NSArray =...

iOS Navigation Bar background color

ios,uiviewcontroller,uinavigationbar

Try this, [[UINavigationBar appearance] setBarTintColor:[UIColor yellowColor]]; or self.navigationController.navigationBar.barTintColor = [UIColor blueColor]; self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; self.navigationController.navigationBar.translucent = NO; and [self.navigationController.navigationBar setBarStyle:UIStatusBarStyleLightContent]; ...

iOS Is there a way to keep the UISearchBar in TableviewHeader when active

ios,uitableview,uinavigationbar,uisearchcontroller

hidesNavigationBarDuringPresentation property of UISearchController determines whether the navigation bar is hidden during searching. Set it to NO friendsSearchController.hidesNavigationBarDuringPresentation = NO; ...

Add Hamburger button to navigation bar

swift,uinavigationbar,uibarbuttonitem

You need to link the UIBarButtonItem up to the NavBar by assigning a customView to to BarButtonItem. I've added an initializer to take care of this for you. init(frame: CGRect, target: AnyObject, action: Selector) { var view = UIButton(frame: frame) var width = 18 let path = UIBezierPath() path.moveToPoint(CGPoint(x: 0,...

xcode navigationbar is not more visible after popover with button

ios,iphone,xcode,uinavigationbar,popover

I solved this problem (temporarily) with adding a new NavigationController to the ViewController3 with (Editor->EmbedIn->NavigationController) and add a back button to buttom of the layout. The problem to segue data from VC1->VC3, i solved with defining a global Variable in VC3 and add a action Button (in VC2) with assigning...

Programmatically add a UINavigationBar that does underlap the status bar

ios,uiview,uinavigationbar

If you are adding a navigation bar programmatically you need to be aware that edgesForExtendedLayout and any bar positioning API will not be relative to the layout guides of your interface. Since you have now indicated you want to manage this bar, the system can't enforce whether it should be...

Swipe NavigationBar horizontally?

ios,uinavigationbar

What you describe is a pan gesture, not a swipe. You can add code that interprets the movement of the pan as if it's a swipe.

How to use native platform icons for ToolBarItems in Xamarin.Forms (programmatically)?

android-actionbar,icons,uinavigationbar,toolbar,xamarin.forms

Currently this looks to be almost impossible to override. Looking at the source for ToolbarRenderer you can see the UpdateItems method. This assumes that all of the toolbar items are of type ToolbarItem and it does not invoke a custom renderer for them, instead calling through directly to an extension...

NavigationBar not loading when ViewController is programatically presented

ios,objective-c,uinavigationcontroller,uinavigationbar,viewcontroller

This is the issue: - (IBAction)pushBasicSearchController { BasicSearchController *basicController = [[BasicSearchController alloc] init]; [self presentViewController:basicController animated:YES completion:NULL]; } You aren't pushing you are presenting. You need to push the view controller using: [self.navigationController pushViewController: basicController animated:YES]; That will solve the missing NavigationBar. For customising a NavigationBar You're better off customising...

How to make the UIImage fit the whole UINavigationBar view's size

ios,xcode,interface-builder,xcode6,uinavigationbar

It should automatically repeat to fill the navigation bar size but if you want it to stretch you can change set the slicing insets in Asset catalog: https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/chapters/SlicinganImage.html or in code something like this: func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { let backgroundImage = UIImage(named: "NavBar")?.resizableImageWithCapInsets(UIEdgeInsetsMake(0, 15,...

UITabBarController Header with Title

ios,uinavigationcontroller,uitabbarcontroller,uinavigationbar

Changing the values of those simulated metrics fields on a storyboard or nib will not actually have any effect on the UI. It's a design/layout aid. You will need to embed the view controllers within navigation controllers or drag navigation bars into the views. ...

Changing the Navigation Bar in Swift

ios,swift,uinavigationcontroller,uinavigationbar

There are many ways to costumize your navigation bar: //You can change the bar style navigationController?.navigationBar.barStyle = UIBarStyle.Black // You can change the background color navigationController?.navigationBar.barTintColor = UIColor(red: 4 / 255, green: 47 / 255, blue: 66 / 255, alpha: 1) // You can add a logo on it let...

Navigation Bar is resetting when pushing a ViewController

ios,uinavigationbar

The UINavigationItem (where you have probably set the logo as titleView) is specific to a single view controller. This makes sense, because the title is usually supposed to describe the content of one view controller. Have you tried setting the same titleView on your second view controller? This will definitely...

How to change Status Bar (Style / Color) of UISplitViewController iOS 8

ios,ios8,uinavigationbar,uisplitviewcontroller,uistatusbar

View controller-based status bar appearance is set to YES by default. So you just have to subclass your split controller like class SplitViewController: UISplitViewController { override func preferredStatusBarStyle() -> UIStatusBarStyle { return UIStatusBarStyle.BlackOpaque } } ...

Navigation bar items disappear when using UISearchDisplayController displaysSearchBarInNavigationBar

ios7,uinavigationbar,uisearchbar,uisearchdisplaycontroller

I tried modifying the resultsTableView frame dimensions with below method while not having search bar in navigation bar i.e self.searchDisplayController.displaysSearchBarInNavigationBar = NO but this caused issues with cancel while in edit mode. This was taken from Moving SearchBar table view (void)searchDisplayController:(UISearchDisplayController *)controller didShowSearchResultsTableView:(UITableView *)tableView{ CGRect s = self.searchDisplayController.searchBar.frame; CGRect newFrame...

I want to change the height of UINavigationBar and add a title..Why is this so difficult?

ios,swift,storyboard,xcode6,uinavigationbar

In a navigation interface, a navigation controller owns its UINavigationBar object and is responsible for managing it. It is not permissible to change the navigation bar object or modify its bounds, frame, or alpha values directly. However, there are a few properties that you can modify More here: apple...

Adding Back Button to Navigation Bar Doesn't Work

ios,xcode,uinavigationbar

Your View Controller should be embedded in a navigation Controller. By doing this a back button is added by default in the View Controller.

Search bar getting hidden by navigation bar when becomes active

ios,uinavigationbar,uisearchbar,uisearchdisplaycontroller

Try this: Set the navigation bar's translucent property to NO: self.navigationController.navigationBar.translucent = NO; This line will fix the view from being framed underneath the navigation bar and status bar. If you have to show and hide the navigation bar, then use this code in viewDidLoad if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) self.edgesForExtendedLayout =...

Adding progress bar under navigation bar in swift?

ios,swift,uinavigationcontroller,uinavigationbar,uiprogressview

My problem was solved. Add the Progress View to View Controller.(Drag and drop) Make a IBOutlet. Write the code: override func viewDidLoad() { super.viewDidLoad() var navBar = self.navigationController?.navigationBar var navBarHeight = navBar?.frame.height var ProgressFrame = self.Progress.frame var pSetX = ProgressFrame.origin.x var pSetY = CGFloat(navBarHeight!) var pSetWidth = self.view.frame.width var pSetHight...

Unable to add Navigation Items on Navigation bar

ios,uitabbarcontroller,uinavigationbar

I finally figured it out, I wasnt able to add any navigation Item because the TabbarCOntroller was the Container View, the following Code Helped Me out self.tabBarController.navigationItem.rightBarButtonItem=right; I also Had to override this code in the second ViewCOntroller with self.tabBarController.navigationItem.rightBarButtonItem=nil; Only then I was able to add and respond to...

Make view loaded from nib respect superview's top layout guide (Navigation Bar Bottom)

ios,swift,interface-builder,autolayout,uinavigationbar

Try one of the following: Use self.edgesForExtendedLayout = UIRectEdgeNone; in your view controller's -viewDidLoad method. This will translate the origin.y to the bottom of the nav bar. Add a constraint in your view controller that makes the LocationPermissionsInfoView's view to respect it's topLayoutGuide. Since you are adding the view programmatically,...

UINavigationBar Weird Standard Height [duplicate]

ios,iphone,uinavigationbar

I'm guessing those screen shots are on an iPhone 6. So evidently your app is not iPhone 6 native. Therefore it is portrayed as an iPhone 5 app, zoomed - hence larger. This is a pity because you are not getting all the pixels you are entitled to (and also...

Wrong animation of layer's y position when using a UINavigationController and UINavigationBar

ios,uinavigationcontroller,uinavigationbar,facebook-pop

Animating kPOPLayerPositionY controls the y value of the position of the center of the layer, not the origin on the frame. The following should work: positionAnimation1.toValue = @(36 + 116 * 0.5); For the error with velocity that you mention earlier, this is because the number of components in the...

top bar not visible after programmatically pushing UINavigationController

ios,objective-c,iphone,uinavigationcontroller,uinavigationbar

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; UIViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"Test"]; UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:viewController]; self.window.rootViewController = nav; ...

Bar Button Item in Navigation Bar is not Visible - Swift

swift,uinavigationbar,uibarbuttonitem

You have to set the Navigationcontroller before your TableViewController and not after your controller. That way your back button will work. Like that: Start-TableViewcontroller -> NavigationController -> Second Tableviewcontroller -> Viewcontroller ...

Changing UINavigationBar later in View Controller

ios,uinavigationbar

Try this: UINavigationBar *navBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 20, [UIScreen mainScreen].bounds.size.width, 41)]; navBar.tag = 1; ... NavigationBar *navigationBar = (NavigationBar *)[self.view viewWithTag:1]; ...

Add a 0.5 point height subview to UINavigationBar not show in iOS7

ios,objective-c,ios7,uiview,uinavigationbar

Solved this by myself. It's the autoresizingMask's fault 😂. I strongly suspect this a bug of iOS7. I print the recursiveDescription in lldb, only to find the height of separatorLine is autoresized to zero in iOS7! In contrast, the value is 0.5 in iOS8. So, remove this line: separatorLine.autoresizingMask =...

Navigation bar blink

ios,objective-c,xcode,uinavigationbar,caanimation

Try adding a sublayer of the navigation bar's layer and add the animation in it. Some custom drawing may be breaking your animation if it is added to the "main" layer. Take note that the color of navigation bars is set using barTintColor property which may differ from backgroundColor of...

UI Navigation Bar Image Title

ios,image,swift,uinavigationbar

You can do the following : var titleView = UIImageView(image: UIImage(named: "nameOfTheImage.ext")) self.navigationItem.titleView = titleView To fits the the image in the dimension you want you have to do the follwoing : var titleView : UIImageView // set the dimensions you want here titleView = UIImageView(frame:CGRectMake(0, 0, 50, 70)) //...