button gives BAD_EXE
I am new to iPhone SDK. I am using butting in my NIB file.Here is code :
[btnSelectCountry setTitleColor:appData.DataColor forState:UIControlStateNormal]; btnSelectCountry.titleLabel.font= 12;
I put Exception break point in my application.and i tried to crash so i can create good product.and it crashes.Exception break point gives me BAD_EXE on
I don't know why it gives my BAD_EXE. because before BAD_EXE, it was working absolutely fine. never crashed at that point.
You can't set a font equal to a number. Notice that when you start typing btnSelectCountry.titleLabel.font into xcode, it will tell you that it expects a UIFont *.
So, if you want to set the font like that, try something like
btnSelectCountry.titleLabel.font = button.titleLabel.font = [UIFont systemFontOfSize:12];
//use this code [btnSelectCountry.titleLabel setFont:[UIFont fontWithName:@"Arial-BoldMT" size:15.0]]; //if it is working then check your appData property i.e appData.FontSmall;
Hope this will make you understand what is going wrong.
btnSelectCountry.titleLabel.font= [UIFont fontWithName:@"Helvetica" size:12];
Try this. You gave size to type font.