How to line break long large title in iOS 13? - uinavigationbar

As title, is there a way to split long large titles in UINavigationBar?
I tried all those methods, working for iOS 11 but none of them seem work to me on iOS 13
How to set multi line Large title in navigation bar? ( New feature of iOS 11)

You can do it by adding a custom view (UILabel) to your title as answered here.

Related

Searchcontroller only available on iOS 11 or newer

I'm trying to make my app iOS 9 compliant. But I get this error for the navigationItem.searchController:
'searchController' is only available on iOS 11.0 or newer
How can I make this available for iOS 9 without changing every search logic through the app?
You cannot set the navigation item's searchController before iOS 11, but you can certainly use the UISearchController, just as we've done for years. Simply extract the UISearchController's searchBar and put it, yourself, wherever you want it in the interface. If you want it as or in the navigation bar, then put it there. For example, make it the navigation item's titleView.

How to remove Tab Bar top border (shadow) in > iOS 10 and Swift 4 with a background image?

I've been trying to remove the top border (shadow) line from Tab Bar in Swift 4 for > iOS 10. I'm also using a custom background image. I've just given up after searching for solutions, since none of them work.
The solution which came closest was this post.
The solution given everywhere works if there is no background or for < iOS 10. For iOS > 10 and using a custom background image none of solutions work.
I even tried using a transparent shadow image, but it required setting cliptobounds to true which doesn't show custom background image.
So at the end of all these solution I'm stuck. Couldn't find any working solution.
I'm setting these custom values in AppDelegate so that it works for all Tab Bars.
I just created a sample project using tab bar template from Xcode and write three lines of code
self.tabBar.layer.borderWidth = 0
self.tabBar.clipsToBounds = true
self.tabBar.backgroundColor = .blue
And tab bar top border is no longer visible. I've tested this on Simulator iphone 6 with ios 11.2

setTitleTextAttributes not working after view on screen. iOS 11

I've spent a whole day trying to change the colour of a UIBarButtonItem and now i'm thinking it is an iOS 11 bug unless someone can tell me it's by design.
I can change the colour of the text by using this code
[self.refreshButton setTitleTextAttributes:#{NSForegroundColorAttributeName: [UIColor orangeColor]} forState:UIControlStateNormal];
If I add the code to the viewWillAppear:animated function it works fine, however if you add it to viewDidAppear:animated it does not work.
It seems to work on the iOS 9 simulator, but not iOS 11.
Has something changed in this regard in iOS 11?
If all you want to do is change the title color of your UIBarButtonItem you can set the tintColor property instead of setTitleTextAttributes:. If you want all of your UIBarButtonItems to have the same title color you can set the tintColor of your tool/navigation bar.
I had the same issue on iOS11 but needed to set the font by setTitleTextAttributes. Unfortunately this does also not work by appearance. The only solution I found was to create new BarButtonItems as copy of the old ones and then set them as navigationItem.rightBarButtonItems.
For reference for other users having the same issue.
This Stack Overflow answer may explain why the method doesn't work.
An improper setting of UIControlState() may be the problem.

A way to achieve UISearchController appearance similar to Photos app in iOS 11

I would like to update my old iOS 10 application's UISearchController appearance to have effect similar to native Photos app in iOS 11.
But I am not sure how to get such smooth animation of NavigationBar transition from LargeTitle to UISearchController.
UPDATE
I know that there is UINavigationItem's property UISearchController, but it just shows UISearchBar under the Large Title and its appearance with hidesNavigationBarDuringPresentation set to true looks completely different.
Thanks for any suggestions.
In iOS 11 there's a new way to add the UISearchController to the UINavigationItem. Check the documentation from Apple.

Aviary SDK frame issue

I have updated the Aviary SDK for iOS 7 compatibility . Previously everything working good but in the iOS 7 I am having the following frame issue . Cancel button and Done buttons are cutting down at the edges and there is some gap from status bar and Aviary present modal view . Any ideas or help would be grateful .
I have found a solution for changing colour for "done" and "apply" button in "AFPhotoEditorController".
select & open "AviarySDKResources.bundle" from your project
open "AviarySDKColors.plist"
open "accentColor"
change value for key "hex" to what you want.
To fix frame dimensions I used
- (void)setPhotoEditorCustomizationOptions
{
[AFPhotoEditorCustomization setUsingIOS6SDK:YES];
}
In IOS 7 they are using Border less navigation bar buttons with text highlight effect,No options to adjust the bar buttons,For Aviary suggesting bar buttons with example IOS 7 screens Layout in the style guide and you can achieve this effects by adjusting bar button color and opacity in Aviary SDK tool.

Resources