User editable large title in UINavigationBar - ios

I need to allow the users to edit the large title of a navigation bar after they tap it.
The solution I have so far is to instantiate a UITextField and assign it as the titleView property of the nav bar.
The problem with this solution is achieving it with the large title style. The titleView shows up in the center of the navigation bar instead of under the back button, where the large title is supposed to show.
How can I place the UITextField over the position of the large title and mimic its appearance?

Related

How to animate a navigation bar large title while resizing bar?

I have a UITableViewController embeded in a UINavigationController, with the property navigationBar.prefersLargeTitles set to true. As it would react normally, when you scroll the tableView, the navigation bar will shrink in size, and with it, the large title will get pushed behind the rest of the navigation bar, and a new small title will appear. What I want to do is to change this animation, to make the large title move to the center of the shrunk navigation bar and shrink in size. How could I do that?

UISearchbar squished in UINavigationbar

I have a search bar set as the title view in my navigation bar. In the initial view the search bar is evenly spaced in the middle with buttons on both sides. In this view the back button pushes the search bar so that it is uneven. I've tried getting rid of the text of the back button, but it still didn't work to spread the search bar out. Squished search bar image
I recently needed to solve the same issue. I ended up creating a UIBarButtonItem with the back button image asset, and setting that as the navigationItem.leftBarButtonItem. This button press then calls navigationController?.popViewController(animated: true) to pop the viewController off the stack

How to manually animate iOS Large navigation bar titles?

I am using a sticky segmented control at the top of my view controller with a scrollable table view underneath it.
I am setting the navigation bar large title with
self.navigationController?.navigationBar.prefersLargeTitles = false
I would like to minimize the large title text to the navigation bar when the user scrolls. Unfortunately the text will not perform this default behavior because of the segmented control that sticks to the top when scrolling.
My first solution was to manually set the prefersLargeTitles = true/false based on scroll position. This will works however there is no animation which looks bad.
How can I achieve this effect? Is there a way to animate the text moving?

IOS Swift: How to change text color and font of menu items using SWRevealViewController

I am using SWRevealViewController class to implement side-out slide bar. I followed this link and side bar is coming.
But I want to change the text colour and size of item texts of slide bar. Any idea how to do it?
I couldn't find any way to update it. Though there are parameters to update the size of window (_initDefaultProperties) but not the item text.

Changing text color of individual bar button items in navigation bar

I have two bar button items placed in the navigation bar, but I want to change the text color of one to show whether its enabled or disabled. I've seen a lot of solutions for changing the text color for all navigation bar button items, but nothing for one specific bar button item. Most solutions on SO seem to be deprecated for iOS7 and iOS8. Any tips?

Resources