我的测试仪在 iPhone 2G 和 iOS 3.1.3 上。应用程序使用这种方法在他的手机上崩溃:
- (void) viewDidLoad
{
[super viewDidLoad];
[resumeGame.titleLabel setFont:[UIFont fontWithName:@"Old English Text MT" size:20.0]];
[startNewGame.titleLabel setFont:[UIFont fontWithName:@"Old English Text MT" size:20.0]];
[options.titleLabel setFont:[UIFont fontWithName:@"Old English Text MT" size:20.0]];
}
和界面:
@interface PuzzleViewController : UIViewController
{
IBOutlet UIButton *resumeGame;
IBOutlet UIButton *startNewGame;
IBOutlet UIButton *options;
}
@property (nonatomic, retain) IBOutlet UIButton *resumeGame;
@property (nonatomic, retain) IBOutlet UIButton *startNewGame;
@property (nonatomic, retain) IBOutlet UIButton *options;
字体被复制到资源文件夹中,并且“Info.plist”“应用程序提供的字体”设置正确。
知道如何解决这个问题吗?