【发布时间】:2009-09-21 12:29:33
【问题描述】:
今天我已经安装了 iPhone SDK 3.1 以及相应的 XCode。发生的事情是我所有的按钮都失去了它们的标题。这是我的按钮创建代码:
UIButton *dateButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect] initWithFrame:CGRectMake(240.0, 57.0, 60.0, 30.0)];
[dateButton setTitle:@"Date" forState:UIControlStateNormal];
[dateButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[dateButton setBackgroundImage:[UIImage imageNamed:@"bg_headline.png"] forState:UIControlStateNormal];
[dateButton addTarget:self action:@selector(GoToDateSettings:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:dateButton];
任何想法是什么问题?此代码在 中完美运行
问候, 姆拉登
【问题讨论】: