UIButton font

Discussion in 'iPhone/iPad Programming' started by LeeDuke, Apr 29, 2009.

  1. macrumors newbie

    Joined:
    Apr 29, 2009
    #1
    How does one change the font and associated properties in a UIButton object?
     
  2. macrumors 68000

    Joined:
    Feb 12, 2008
    Location:
    Illinois
    #2
    There's a UIButton property "font"...

    PHP:
    button.font = [UIFont....];
    or 
    [
    button setFont:[UIFont...]];
    You wouldn't have to wait as long for an answer by skimming through the UIButton docs :)
     
  3. thread starter macrumors newbie

    Joined:
    Apr 29, 2009
    #3
    Nice try

    I did read the documentation. I had already tried both methods you suggest. The code complies and loads fine. Unfortunately, I get a black screen when the app tries to execute. If I comment out the button.font defintion, the app works fine.

    I was looking for a working solution not a theoretical one.
     
  4. macrumors 6502

    mccannmarc

    Joined:
    Aug 15, 2008
    Location:
    Manchester, UK
    #4
    Post your relevant code and we will be able to tell you what the problem is, if you want working solutions then provide details that people are able to work with!
     
  5. macrumors 68000

    Joined:
    Feb 12, 2008
    Location:
    Illinois
    #5
    Post your code, because before I give my posts, I always check with a new project in Xcode (to eliminate theory). So I know it's working at the bare minimum (a single button in the window).

    Just because you comment out one line doesn't mean it's that specific line that's not working.

    We'd be able to help you a lot better with your code. Preferrably your applicationdidfinish launching and the code where you create the button and add it to the view :).
     

Share This Page