iOS Question Change Button text size by code

Discussion in 'iOS Questions' started by Mike1970, Sep 11, 2018.

  1. Mike1970

    Mike1970 Member Licensed User

    How can i change text size of a button by code?
    I tried with: btn.CustomLabel.??? but after customlabel i don't find anything that can premit to me to change the text size
    (the text its actually fontawesome)
  2. Andrew (Digitwell)

    Andrew (Digitwell) Active Member Licensed User

    In iOS the Font size is a part of the Font Object so you would normally do something like.
    btn.CustomLabel.Font = Font.CreateNew2("<FontName>",<FontSize>)
    btn.CustomLabel.Font = Font.CreateFontAwesome(<FontSize>)
    You can store the Font in a global variable and re-use if you prefer.
    Mike1970 likes this.
  3. Mike1970

    Mike1970 Member Licensed User

    Ok thanks, i will try it later :D
  4. Mike1970

    Mike1970 Member Licensed User

    It worked! Thanks
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice