【发布时间】:2014-01-04 01:50:40
【问题描述】:
我正在开发一个 iOS 应用程序,我必须插入一个 UIButton。
我想自定义这个按钮,我想要一个这样的按钮:
我的代码是这样的,但我无法制作圆角:
_topImagesScrollViewButton = [UIButton buttonWithType:UIButtonTypeCustom];
_topImagesScrollViewButton.frame = CGRectMake(screenWidth/2-25, topBarHeight+paddHeight, 37 , 37);
_topImagesScrollViewButton.backgroundColor = [UIColor colorWithRed:red_middle green:green_middle blue:blue_middle alpha:alpha_middle];
[_topImagesScrollViewButton setTitle:@"Top" forState:UIControlStateNormal];
[_topImagesScrollViewButton setTitleColor:[UIColor colorWithRed:red_text green:green_text blue:blue_text alpha:alpha_text] forState:UIControlStateNormal];forState:UIControlStateNormal];
[_topImagesScrollViewButton addTarget:self action:@selector(topImagesScrollVieButtonTapped) forControlEvents:UIControlEventTouchUpInside];
我该怎么办?
【问题讨论】:
-
字体类型没问题..