1,148 questions
0
votes
1
answer
120
views
How can I change backgroundColor of searchBar inside a navigationItem?
In iOS 26 navigationItem.searchController.searchBar.searchTextFIeld.backgroundColor is only affected if navigationItem.hidesSearchBarWhenScrolling is set to false (which is not what I want). However, ...
0
votes
1
answer
269
views
UINavigationController with custom navigationItem titleView not working inside UITabBarController under iOS 26
I've sample code for the reference which works fine prior iOS 26 but not in iOS 26.
class SampleViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
...
4
votes
2
answers
1k
views
Navigation item title hidden when using large title in iOS26
After updating my app for iOS 26, the navigation item title stopped working when using large title and scrolling. Before the update, the large title was shown and when scrolled up, the normal small ...
2
votes
1
answer
590
views
iOS 26 Disable UINavigationBar titleView automatic color inversion [closed]
Is it possible to disable automatic color inversion in iOS 26 UINavigationBar which triggered by the system depending on background? Can't find any new method in documentation for that.
This is for ...
0
votes
1
answer
22
views
navigationItem.rightBarButtonItem No Longer Present After Converting from AppDelegate to SceneDelegate
I received a rather ominous warning that my app must be upgraded to support Scenes. So I updated it based on the approach specified in Apple documentation (Managing your app’s life cycle and ...
1
vote
2
answers
91
views
How to detect touches on far right edge of navigation bar
I have a UIBarButtonItem assigned to navigationItem.rightBarButtonItems, and I would like the user to be able to tap all the way over to the right edge and have it respond. The Apple Notes app does ...
0
votes
0
answers
35
views
How to animate a custom back button to the default back button in UINavigationBar?
I would like to replicate the back button transition seen in apps like the App Store or Apple Music. Specifically, I want to animate a custom-shaped back button into the default back button during ...
1
vote
2
answers
84
views
UiNavigationController - title in navigation bar is off-center when right side has 2 buttons
I'm using a UINvagigationController for my app, with every page setting their own title and left and right buttons.
Worked perfectly until I needed two buttons to the right. Just setting them as bar ...
0
votes
1
answer
72
views
navigationItem.rightBarButtonItems is not displayed on the root view controller when popToRootViewController is called
In the final viewcontroller of my application, I use popToMainViewController to go back to the first view controller. When the method is called, customized rightBarButtonItems is not displayed. ...
0
votes
1
answer
113
views
Changing background colour of navigationItem and barButtonItem in iOS 16.2
I just need to change the background colour of navigationItem and barButtonItem in my app.
I have tried so many methods in stack overflow but none of them worked.
I have also tried in my storyboard by ...
-1
votes
2
answers
275
views
Why UINavigationItem shows menu button?
I have UINavigationItem with UISearachController;
#warning - addded UISearchController
self.searchController = [[UISearchController alloc] initWithSearchResultsController:nil];
self.navigationItem....
0
votes
2
answers
69
views
Hide Navigation Item but show Back Bar Button
Now, I will put an image at the top of the screen in the design I created. However, the Navigation Title area is displaying the image in white color. Since I need the back button, I want to move the ...
0
votes
0
answers
37
views
How can I make navigation item searchbar fully visible/hidden, when I scroll down/up?
I can make search bar in navigation item partially visible when I Scroll the tableView, But I want only fully visible or fully hidden.
I couldn't make searchBar partially visible in any other iOS Apps ...
2
votes
1
answer
603
views
iOS 16 additional empty space in navigation item
When I creatе the simplest titleView with iOS 16 and add it to the navigationItem I see an additional space that I cannot remove in any way. I did not have this issue on iOS 15, does anybody know what ...
0
votes
2
answers
172
views
How to change the text color of rightBarButtonItem Item in Swift
I am trying to change the text color of the rightBarButtonItem item text and it blue by default . I am trying to change it to black .
My current code for that is:
self.navigationItem....
0
votes
1
answer
63
views
Swift UIBarButtonItem stays highlited when going back to the root controller
I have a problem with my navigation bar items. They both have a target to push a view controller, but the problem is that when I go back to the root view controller by dragging to the right, the ...
0
votes
2
answers
360
views
UIView overlapping UINavigationBar
I am working on an iOS app which presents a viewcontroller modally. This viewcontroller is embedded in a navigation controller.
However on iPhone 12, iPhone XR the navigation title, Done and Back ...
0
votes
1
answer
52
views
Circular UIBarButtonItem button image get stretched
Added circular button on self.navigationItem.leftBarButtonItem for specific UIViewController of a TabBarcontroller after switching one tab and getting back to specific tab. The circular button is ...
1
vote
1
answer
1k
views
Navigation bar title truncated after relaunching application
Recently I getting e wired problem
When I run my application from XCode navigation title text is showing perfect.
But when I close the application and reluanch again text cuts off with
...
I tried ...
0
votes
2
answers
901
views
How to create custom back button in navigationBar in swift?
public override func viewDidLoad() {
super.viewDidLoad()
navigationItem.backBarButtonItem = .init(image: "back_icon".image, style: .plain, target: nil, action: nil)
}
For this above ...
1
vote
0
answers
75
views
How to change navigation item content and buttons, on tab bar click?
My code has a Tab Bar Controller and switches between 2 Scenes with their own View Controllers.
The Navigation Item on top is the same on both, but I want to have different navigation item content, ...
0
votes
1
answer
219
views
Crash when pop to navigationItem with titleView
I've been seeing this crash in logs, but unable to reproduce. It occurs when I pop to previous UIViewController in navigation stack, and that view controller had a custom titleView set. I haven't been ...
1
vote
1
answer
174
views
Tableview y origin not animating properly when navigationItem.titleView is hidden (Swift 5)
I’m trying to get the tableView to move up when the search bar does. Take a look at the problem:
I think I see what the issue is here, but I can't think of a solution. In SearchResultsUpdating I have ...
0
votes
1
answer
909
views
UINavigation custom back button image not working in iOS 15
I want to apply UINavigation custom background image and back button image also for iOS 14 everything is working fine but as I try to run the app on iOS 15 back button image not working instead it's ...
1
vote
1
answer
203
views
Why will UITableViewController navigationItem.searchController not set in iOS?
For some reason, when I set UITableViewController navigationItem.searchController with a UISearchController, it doesn't take it.
Here is my code:
let searchController = UISearchController(...
0
votes
0
answers
34
views
UINavigationBarButtonItem not displaying text from Image
I am using a PDF image for a UINavigationBarButtonItem, but the text from the image is not displaying on the button, and I do not know why. Do I need to use and SVG image format?
let liveIcon = ...
0
votes
1
answer
89
views
Back Button Tint Color
How can I change the back button of a certain navigation controller. I have tried to use
override func viewDidLoad() {
super.viewDidLoad()
navigationItem.backBarButtonItem?.tintColor = UIColor....
0
votes
1
answer
669
views
Changing the back button of UINavigaitonBar with MVVM+C
I am using MVVM+C pattern to build my app. Currently I am facing a problem with changing the native back button title and image of navigation bar to the custom image without the title. I've tried a ...
1
vote
2
answers
3k
views
Use `navigationItem.backButtonDisplayMode = .minimal` with a custom back button image
For an iOS 14+ app I'd like to use navigationItem.backButtonDisplayMode = .minimal to hide the back button title, while still having the title available in the back button's long-press menu. Which ...
0
votes
1
answer
1k
views
Issue with top margin of title in uinavigationbar ios
I try to programmatically add UINavigationBar in my viewController, however I got the markup issue which makes my navigation bar title move to the top border of the safe area and I wonder how to move ...
0
votes
1
answer
472
views
Navigation item in my UIViewController is overlapping child views and labels
I am adding custom navigation item to my application. But every time I navigate the items of navigation item overlaps. My code is
func fixNavBar(){
self.navigationItem.setHidesBackButton(...
2
votes
1
answer
423
views
view controller doesn't respect "largeTitleDisplayMode"
It seems that I can't set navigationItem.largeTitleDisplayMode = .always unless I also set navigationBar.prefersLargeTitles = true? Is this intended behavior?
I'm having a really hard time believing ...
4
votes
3
answers
783
views
Why does setting a custom backBarButtonItem for a UINavigationItem result in double back buttons?
I have a very simple setup. A UINavigationController with a root UIViewController that modifies its navigation item with a custom back button item on viewDidLoad.
let backButton = UIBarButtonItem(...
1
vote
0
answers
56
views
NavigationItem leftNavigationItem is not clickable
I am having MasterViewController and it has childView as UITabBarController. UITabBarController has navigationcontroller as tab bar item. Both MasterViewController and TabBarItem ViewController ...
0
votes
2
answers
443
views
Swift 5 - navigationItem.title not showing
My navigationItem.title behaves in a strange way.
When the viewController is pushed on to stack the title is not showing (top image). However, while viewController gets popped, the title becomes ...
0
votes
0
answers
743
views
How to make UISearchController show and hide itself when button pressed?
I just read a bit on how to use UISearchControllers, and I want to figure out how I can make it show up with the click of a button, and make it disappear fully when the cancel button is pressed.
Here ...
1
vote
3
answers
1k
views
Swift How can I keep only the first page with a large title?
The large title of navigation item comes out when the app just describes execution. However, when I move to another page and come back, that mode is turned off. Create a viewDidLoad for each page as ...
0
votes
0
answers
850
views
Two NavigationBar Items appears twice in the second current view
I have a current SwiftUI View with a Navigation Bar item . I created a Back Button on this current view so that the title is not inherited from the previous view (NEWSview) with list of news websites ...
1
vote
1
answer
1k
views
Adding Back icon and "Back" text within a UINavigationItem button in SwiftUI
I have a button that i want it have the < back icon and also back text to it . This is what i did:
Text("\(Image(systemName: "chevron.left"))Back")
I am getting this error:
...
0
votes
0
answers
40
views
iOS - changes to navigationItem applied but not visible
I want to thank in advance for your help. My issue is that I'm trying to set the title as a attributed String. I'm using the Storyboard and I have embedded the rootViewController in a ...
0
votes
3
answers
1k
views
How to set rounded profile picture image(from url string) to UIBarButton item in iOS Swift
Hi I'm working on an iOS Swift project in which I want to show users profile picture in the navigation bar as rounded. I tried lot of sample code, but it is not making rounded curve. Please help me.
I ...
0
votes
1
answer
157
views
The navigationItem on NavigationBar is shifted when scrolling on tableView
When I scroll on tableView, the navigationItem is not hide and move a little to bottom.
i tried it on lower version (iOS 13, iOS 12), however this issue is happen on iPhone 11 (iOS 14).
I searched any ...
0
votes
1
answer
222
views
Unable to change backBarButtonItem in Swift
I want to make my backBarButtonItem to be only < , without back. I have searched stackOverflow and found some solutions, but it stays < back.
I tried this in my pushed VC:
navigationItem....
0
votes
2
answers
1k
views
Can I make large rightBarButtonItem in Swift?
What I have:
self.title = "Title"
navigationController?.navigationBar.prefersLargeTitles = true
self.navigationController?.navigationBar.largeTitleTextAttributes = [NSAttributedString.Key....
0
votes
0
answers
428
views
Show search bar without having to scroll up first?
I am trying to add a search bar to my table view so it can filter settings for the user. The only problem is it is initially hidden when the view first loads, giving no indication it is available.
It ...
2
votes
1
answer
1k
views
hidesBackButton is not working, even though in viewDidLoad
I have seen similar questions, but those questions are all very old. I'm trying to hide the 'back' button in my ViewController. Now, it looks like this: https://www.dropbox.com/s/ipmbqgxji574j06/...
1
vote
1
answer
952
views
Custom TitleView in NavigationBar
I am trying to add a a user's image and name to a navigation bar to look like the following:
I am attempting to do this programmatically, as my codebase doesn't use xibs or storyboards (except for ...
0
votes
2
answers
62
views
Swift NavBar Hide NavBarItem
Inside of my view controller I have a navBar with an item on the left side and right side. I also have 2 buttons inside of the view controller. I have it so each button does different functionality. I ...
0
votes
0
answers
25
views
navigationItem is displayed very high swift 5 [duplicate]
I make a navigation bar programmatically without a navigation controller. The problem is when I add a navigation item, they are displayed very high. Help solve. The screenshot shows how it looks
...
0
votes
1
answer
715
views
Navigation Bar Title switches from Small to Large text after switching ViewControllers and scrolling down?
I just noticed this issue in my app. I don't wan't to have Large titles at all, so this is the code that I'm calling in my viewDidLoad()...
//MARK: - Navigation Bar Setup
func navConAcc() {
...