Questions tagged [uinavigationitem]

on iOS, the UINavigationItem class encapsulates information about a navigation item pushed on a UINavigationBar object’s stack

UINavigationItem is a part of the UIKit framework and is available from iOS 2 and later. The UINavigationItem class encapsulates information about a navigation item pushed on a UINavigationBar object’s stack

UINavigationItem Class Reference

1143 questions
0
votes
1 answer

UINavigationBar titleView for different orientation

What is the best way to resize UINavigationBar titleview content image when orientation is changed. I have one image with 44px height and another for 32px and after view is rotated I change the titleview and set new imageview. but maybe there is…
taffarel
  • 4,015
  • 4
  • 33
  • 61
0
votes
2 answers

NavigationItem titleView being cleared when new view pushed onto navigation controller

Why navigation item titleview is cleared every time I push a new view onto the view stack via the navigation controller. Why does this happen? In my first view controller I have set a UIImageView with a titleview manually. But when the view is…
0
votes
2 answers

How do I access programmatically created buttons?

I'm adding multiple buttons to the navigation bar like so. UIToolbar* tools = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 133, 44.01)]; NSMutableArray* buttons = [[NSMutableArray alloc] initWithCapacity:2]; UIBarButtonItem *bi =…
Jhorra
  • 6,233
  • 21
  • 69
  • 123
0
votes
2 answers

UINavigationBarItem programmatically

I have view controller which is inherited from UINavigationController. On viewDidLoad I want to set rightBarButtonItem. I do following. UINavigationItem* navItem = self.navigationItem; UIButton* btnOptionsView = [[UIButton alloc]…
taffarel
  • 4,015
  • 4
  • 33
  • 61
0
votes
1 answer

Is it possible to make the navigationcontroller title a button?

Is it possible to make the navigationcontroller title a button? but without a button look to it. I want it to be just text that if you click on it a view/actionsheet pops up from the bottom If so, can you show me programmatically how I would make…
0
votes
4 answers

UIBarButtonItem not showing up in UINavigationController

I'm trying to add 2 buttons to a UINavigationController's navigation-bar: 1) the standard "back" button on the left side - which works, and 2) a "search" button on the right side - which does not show up. Here's the…
0
votes
4 answers

Strange behaviour of simulator & device when adding rightBarButtonItems to a UINavigationItem

In my application I am added two button at right of a UINavigationItem, its working fine on simulator, but when I testing it on device its gives me error of SIGABRT, along with unrecognized selector sent to NSArray. I tried to add one button at…
Hemang
  • 26,840
  • 19
  • 119
  • 186
0
votes
1 answer

Right button in the UI navigation controller is not getting displayed in Monotouch

I am tryin to add a custom button in the UI navigation controller toll bar i dis this as follows created a class derived from UInavigation controller 2 .Overloaded the viewdidload as follows { logoutbutton = new…
-1
votes
2 answers

titleView only works in one view controller (self.navigationController is nil)

I have a few navigation controllers that are set up in a NIB under a tab controller. I'm trying to set up the same logo in the top view controller of each navigationcontroller. In the first view controller that appears, I have this code in…
-1
votes
2 answers

Why UINavigationItem shows menu button?

I have UINavigationItem with UISearachController; #warning - addded UISearchController self.searchController = [[UISearchController alloc] initWithSearchResultsController:nil]; self.navigationItem.searchController =…
Vit
  • 936
  • 1
  • 10
  • 20
-1
votes
1 answer

Changing leftBarButtonItem position. It is far from the border

I have a UIButton let leftButton = UIBarButtonItem(image: UIImage(named: "draggerMore.png"), style: .plain, target: self, action: #selector(crossBtnTapped)) and I set it as leftBarButtonItem self.navigationItem.leftBarButtonItem =…
Dima
  • 1,189
  • 1
  • 8
  • 12
-1
votes
2 answers

UINavigationBar titleTextAttributes - not applied during transitions

I have give my nav bar titles a larger font like this: let navBarTitleTextAttributes = [ NSAttributedString.Key.font: UIFont.systemFont(ofSize: 24.0, weight: .black) ] UINavigationBar.appearance().titleTextAttributes =…
-1
votes
1 answer

Multiple Modally Presented (page sheet) ViewControllers Navigation Item Bug

iOS 13. The problem is shown on the screenshot. The steps are: Open one view controller modally with page sheet style. Open another (second) view controller modally with page sheet style. Expected: no Nav Bar bug Actual: see screenshot The…
Renatus
  • 1,123
  • 13
  • 20
-1
votes
2 answers

iOS UINavigationBar button image is too small for pdf vector icon

I was set pdf vector image in UINavigationBar rightBarButtonItem but it still displaying too small. How to display full size vector image in UINavigationBar? I was try following code:- First way:- UIBarButtonItem *barbutton = [[UIBarButtonItem…
Bhaumik Surani
  • 1,730
  • 3
  • 19
  • 40
-1
votes
1 answer

Modify default navigation bar or create fully custom navigation bar from UIView

I worked on app, and I cannot choose what to do: 1) Modify default UINavigationBar or 2) Create my own view as navigation bar and use it 3) Or even more - just place need elements (buttons, imageViews and label) on view. What is the best option? And…