Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
2k views

Use UINavigationBar appearance "back" icon for custom button?

I need to achieve a custom navigation bar's "< back" button as seen in the push segue, but on a modal. I want to avoid too much hard-coding and found out about the property ...
Big Chungus's user avatar
1 vote
3 answers
741 views

How to change UIButton titlelabel fonts style and size in appearance()?

I am using the code below but it's not working. Can anyone help me to resolve this problem? UIButton.appearance().titleLabel?.font = UIFont(name: "Roboto-Regular", size: 20.0)
Muhammad Tayyab's user avatar
0 votes
1 answer
474 views

Round button on custom class with UIAppearance

I am trying to apply styles on a custom class using UIAppearance() class MainStyleButton: UIButton {} with a code: let buttonView = MainStyleButton.appearance() buttonView.backgroundColor = Style....
AlexR's user avatar
  • 33
2 votes
1 answer
1k views

How to change tint of navigation bar in SafariViewController when setting UIButton appearance in AppDelegate

I am trying to change the tint of the navigation bar in a SFSafariViewController when UIButton.appearance() is being set in the AppDelegate. For example: AppDelegate func application(_ application: ...
Amelia's user avatar
  • 185
3 votes
5 answers
7k views

How to set UIButton font via appearance proxy in iOS 8?

I tried to set the font of UIButton via appearance proxy. But it doesn't seem to work. This is what I tried. UIButton.appearance().titleFont = UIFont(name: FONT_NAME_DEFAULT, size:20.0) UIButton....
Hlung's user avatar
  • 14.3k