Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

LeeDuke

macrumors newbie
Original poster
Apr 29, 2009
2
0
How does one change the font and associated properties in a UIButton object?
 
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 :)
 
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.
 
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!
 
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 :).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.