Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global font and navigationItem.backButton issue #1183

Merged
merged 3 commits into from
Oct 26, 2018
Merged

Global font and navigationItem.backButton issue #1183

merged 3 commits into from
Oct 26, 2018

Conversation

OrkhanAlikhanov
Copy link
Contributor

Global theme can be changed in Theme.font. The value has to be a type that conforms to FontType. For example, to use Theme.font = UIFont.self, it has to be conformed to FontType:

extension UIFont: FontType {
  public static func regular(with size: CGFloat) -> UIFont {
    return systemFont(ofSize: size, weight: .regular)
  }
  
  public static func bold(with size: CGFloat) -> UIFont {
    return systemFont(ofSize: size, weight: .bold)
  }
  
  public static func medium(with size: CGFloat) -> UIFont {
    return systemFont(ofSize: size, weight: .medium)
  }
}

@daniel-jonathan
Copy link
Member

Looks great! Thank you 🥇

@daniel-jonathan daniel-jonathan merged commit 091d430 into CosmicMind:development Oct 26, 2018
@MuhammadNayabButt
Copy link

@OrkhanAlikhanov How can I get the latest code. I am using cocoapods pod 'Material', '2.16.4'. I cannot see the changes. Although when From the development branch I copy pasted NavigationController.Swift file and used that in sample project and it is working fine now. But I don't want to copy paste code.

@OrkhanAlikhanov
Copy link
Contributor Author

The changes are in development branch. You need to have Xcode 10 and swift 4.2 to use them. See #1172 (comment)

@MuhammadNayabButt
Copy link

@OrkhanAlikhanov when will these changes be available on Master.
I have used the development branch but there are some issues with tint colors of raised button. Master is working fine.
I will move to development if it contains the latest updates and those changes will be applied on Master as well.

@OrkhanAlikhanov
Copy link
Contributor Author

OrkhanAlikhanov commented Oct 31, 2018

@MuhammadNayabButt The development branch will eventually be merged to master, but we have no exact schedule. As for color issue (#1176), it's introduced by theming #1115 you can use Theme.isEnabled = false in your AppDelegate.swift file to disable it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants