【发布时间】:2014-02-27 03:56:26
【问题描述】:
我有两个具有相同图像的自定义 UIButton。一个是以编程方式创建的,它是模糊的,另一个是使用故事板,它工作正常。这是我的代码
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
UIButton *purchaseButton=[UIButton buttonWithType:UIButtonTypeCustom];
purchaseButton=[UIButton buttonWithType:UIButtonTypeCustom];
purchaseButton.frame=CGRectMake(0, 35.5+30, 177, 55);
[purchaseButton setImage:[UIImage imageNamed:@"GouMai1.png"] forState:UIControlStateNormal];
[self.view addSubview:purchaseButton];
}
这里是项目下载link(因为GFW,只能上传到中文网站)。这是 Xcode 的错误吗?
【问题讨论】:
标签: ios objective-c ios7 uibutton