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

How to change particular button titleLabel font and size. #3

Open
joprithiviraj opened this issue Aug 16, 2017 · 3 comments
Open

How to change particular button titleLabel font and size. #3

joprithiviraj opened this issue Aug 16, 2017 · 3 comments

Comments

@joprithiviraj
Copy link

I tried to set particular button title label font name and size but it not working, can you please share me....

@codegeeker180
Copy link
Collaborator

Can you please elaborate your issue in detail.

@joprithiviraj
Copy link
Author

joprithiviraj commented Aug 16, 2017

  1. I have lot of buttons in view controller, I want to change particular button title font name and font size.
  2. If I click on button, I need to change Font name and size.

I added this code in didFinishLaunchingwithOptions,
AVFonts.changeFont( toFont: "Avenir-Heavy")
AVFonts.applyAVFonts()

Then When I clicked on button in ViewController:
@IBAction func changeFont(_ sender: Any) {
AVFonts.changeFont( toFont: "Avenir-Light")
AVFonts.applyAVFonts()
}
Its cannot be changed in same ViewController.
Can you please do it this kind of functionalities. Thanks in advance.

@neophyteKB
Copy link

In a view controller, when you need to change font of one specific button, use native code to do that.
This AVFONT is generic code methods to update all fonts while view loads in all classes. Not for specific you are using.

Do change font of button in viewWillAppear or button action.

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

No branches or pull requests

3 participants