【发布时间】:2012-02-22 11:23:05
【问题描述】:
我的应用正在放置一个带有自定义背景图像的按钮,我不需要在它周围设置边框。 我不确定如何删除边框。 我的代码是:
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
button.frame=CGRectMake(100, 170, 100,30);
UIImage *cbutton = [UIImage imageNamed:@"pdficon_small.png"];
[button setImage:cbutton forState:UIControlStateNormal];
UIButton *button2 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button2 addTarget:self
action:@selector(openWordings:)
forControlEvents:UIControlEventTouchDown];
[button setTag:2];
[self.view addSubview:button];
提前致谢。
【问题讨论】:
标签: iphone objective-c xcode xcode4 ios5