Questions tagged [navigationitem]

80 questions
0
votes
1 answer

How to add a gap to a UISearchController?

I've added a search controller using the storyboard and added in the search controller programmatically. I'm having a bit of trouble centering the search bar vertically so that it's not touching the top navigation bar (see photo). How I added the…
Heron
  • 1
  • 2
0
votes
1 answer

How to add the info icon to the nav bar and implement the showInfoView method?

I am attempting to add an info button to the top of the navigation bar. The info button directs the user to the information view. The following code adds the iPhone default info button to the navigation bar. It is placed inside RootViewController.m…
0
votes
0 answers

Add rightBarButtonItems to NavBar in UISplitViewController (swift 3)

I am trying to set a custom BarButtonItem to my NavigationBar of my DetailsVC in my UISplitViewController with these two lines of code: let barbuttonitem = UIBarButtonItem(title: "Hi", style: .plain, target: nil, action: nil) …
0
votes
1 answer

How to add 'new' text in navigation drawer item?

I've a navigation drawer and I want to add just a 'new' text besides the item in navigation drawer like this gmail app navigation drawer. I just want to add text i don't want to make it functional or more complicated. please suggest me how I can…
Al Walid Ashik
  • 1,545
  • 20
  • 32
0
votes
1 answer

swipe back hides some navigation item in swift

I have a problem regarding swipe back gestures in swift. After I push the new uicollectionviewcontroller when certain cell is pressed at the parent uicollectionviewcontroller, I swipe back to the parent viewcontroller. But only a few navigationitems…
David W Nam
  • 113
  • 1
  • 7
0
votes
1 answer

UISegmentedcontrol with UINavigationcontrol - UISC disappears

I have a UINavigationcontrol with UISegmentedcontrol and two options. The two options pushes to different UIViewcontrollers. When the user push the second option the UISegmentControl is still there, but when the user push the first option again the…
Joel Wiklund
  • 1,697
  • 2
  • 18
  • 24
0
votes
1 answer

Swift 4 upgrade issue with imageViews as bar buttons within navigation bar

So I have upgraded to swift 4 and now my left & right uiimageviews set as left/right nav button items are showing as large icons. I have figured out that the Frame setting is not being applied and I am not sure why. Does anyone know what may cause…
Anthony
  • 3
  • 1
0
votes
1 answer

in Swift4, replacement of navigationItem.leftBarButtonItem resizes unwanted

Having a problem with UIBarButtonItem resizing when returning to VC with different values for frame and image. var selectedR = 1 var leftFrame = CGRect() var leftImage = UIImage() override func viewDidLoad() { super.viewDidLoad() if…
Peter de Vries
  • 780
  • 1
  • 6
  • 14
0
votes
1 answer

navigationBar backButton title present but arrow missing on instantiated viewController

I am pushing from a viewController to another instance of the same viewController using the following code. The viewController is the top view of the navigation stack in the storyboard: let storyboard = UIStoryboard(name: "Main", bundle: nil) if…
alionthego
  • 8,508
  • 9
  • 52
  • 125
0
votes
1 answer

how to trigger an event of navigationitem rightBarButtonItem programmatically?

i created an navigationitem rightBarButtonItem in the following code and I would like to trigger its event programmatically ( just like click the bar button ). search everywhere but can't find how to do it. does anyone know the method? thx a lot. …
Alexander Huang
  • 1,345
  • 2
  • 11
  • 16
0
votes
1 answer

iOS navigationItem titleView image and text

I want to set the navigationItem's titleView with image and text like the picture below: How do I achieve that? More specifically, I am trying to do this in Swift.
andyjslee
  • 589
  • 2
  • 5
  • 15
0
votes
3 answers

Restore original back button behavior

In a UIViewController viewDidLoad method I customize icon and behavior of the navigation left button this way: let backButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.action, target:self,…
user5273262
0
votes
1 answer

Valid way to hide QLPreviewController RightBarButtonItem/RightBarButtonItems Xamarin iOS

My app supports iOS8+ devices. I want to hide right Action button from navigation bar. By research I found following few workarounds: 1. Create Sub class of QLPreviewController and in ViewDidAppear SetRightBarButtonItems to zero. public class…
user2618875
  • 889
  • 2
  • 11
  • 23
0
votes
1 answer

Can't set UINavigationItem title programatically on initial load

I'm am performing a segue (via storyboard) from a TableViewController (embedded in a NavigationController) to another TableViewController. I.e Selecting a cell and presenting another TableView on which i would like to display the selected cell's…
Vince
  • 691
  • 1
  • 8
  • 18
0
votes
1 answer

How can I set title of NavifationItem from IB (separate xib of my own ViewController)

Can anybody help me in such situation: I have Navigation interface in my application and push TestController to nav stack Also I have separate xib file: Test.xib where File owner's is TestController. Test.xib has View (property TopBar set as…
LIAL
  • 1,624
  • 4
  • 24
  • 30