
- iOS Tutorial
- iOS - Home
- iOS - Getting Started
- iOS - Environment Setup
- iOS - Objective-C Basics
- iOS - First iPhone Application
- iOS - Actions and Outlets
- iOS - Delegates
- iOS - UI Elements
- iOS - Accelerometer
- iOS - Universal Applications
- iOS - Camera Management
- iOS - Location Handling
- iOS - SQLite Database
- iOS - Sending Email
- iOS - Audio & Video
- iOS - File Handling
- iOS - Accessing Maps
- iOS - In-App Purchase
- iOS - iAd Integration
- iOS - GameKit
- iOS - Storyboards
- iOS - Auto Layouts
- iOS - Twitter & Facebook
- iOS - Memory Management
- iOS - Application Debugging
- iOS Useful Resources
- iOS - Quick Guide
- iOS - Useful Resources
- iOS - Discussion
How can I change the text color of the Navigation Bar on iOS?
Changing the text color of the navigation bar is tricky and easy at the same time, In this post, we will be seeing how one can change the text color of navigation bar in swift.
So let’s get started,
Embed your view controller in Navigation controller as shown below and name navigation item for that particular controller as a tutorial as shown,
Now navigate to AppDelegate.swift and add below lines in didFinisheLaunchingWithOptions method.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. let textColor = [NSAttributedString.Key.foregroundColor:UIColor.green] UINavigationBar.appearance().titleTextAttributes = textColor return true }
Run the app, to see the effect we’ve changed the color to green here.
- Related Articles
- How can I change the text color with jQuery?
- How to get the Navigation Bar height in iOS?
- How I can change alert message text color using JavaScript?
- How to create transparent Status Bar and Navigation Bar in iOS?
- How to change the font and color on the UITextView in iOS?
- How to change background color of TableView items on iOS?
- How to set background for Navigation Bar in iOS?
- Adding Navigation Bar programmatically iOS using Swift
- How do you animate the change of background color of a view on iOS?
- How can I change the text of the Tkinter Listbox item?
- How do I get the height and width of the Android Navigation Bar programmatically?
- How to change the color of selected text using CSS?
- Change Color of Button in iOS when Clicked
- How to change the font color of a text using JavaScript?
- How to change the text color of an element in HTML?

Advertisements