UISegmentedControl更改圆角

1  UISegmentedControl *segmentC = [[UISegmentedControl alloc]initWithItems:[NSArray arrayWithObjects:@"本周周报",@"历史周报", nil]]; 2     3    segmentC.frame = CGRectMake(0,0, 120, 30); 4     5    6     7    segmentC.layer.borderColor = [UIColor whiteColor].CGColor; 8     9    segmentC.layer.borderWidth = 1; 10     11    segmentC.tintColor = [UIColor whiteColor]; 12     13    segmentC.backgroundColor = [UIColor clearColor]; 14     15     16     17    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor], NSForegroundColorAttributeName,[UIFont systemFontOfSize:14],NSFontAttributeName,nil]; 18     19    [segmentC setTitleTextAttributes:dic forState:UIControlStateNormal]; 20     21    segmentC.layer.cornerRadius = 15.0f; 22     23    segmentC.layer.masksToBounds = YES; 24     25     26    segmentC.tintColor = [UIColor whiteColor]; 27     28        self.navigationItem.titleView = segmentC;
点赞
收藏

评论区

加载中...

相关推荐

MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1

文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s

Oracle 分组与拼接字符串同时使用

SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(

手写Java HashMap源码

HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22

PPDB:今晚老齐直播

【今晚老齐直播】今晚(本周三晚)20:0021:00小白开始“用”飞桨(https://www.oschina.net/action/visit/ad?id1185)由PPDE(飞桨(https://www.oschina.net/action/visit/ad?id1185)开发者专家计划)成员老齐,为深度学习小白指点迷津。

UINavigationController设置透明背景

self.navBar\\UINavigationBaralloc\initWithFrame:CGRectMake(0,0,self.view.frame.size.width,NAV\_BAR\_HEIGHT)\;\self.navBarsetBackgroundImage:\UIImageimageWithColor:

Android蓝牙连接汽车OBD设备

//设备连接public class BluetoothConnect implements Runnable {    private static final UUID CONNECT_UUID  UUID.fromString("0000110100001000800000805F9B34FB");

UISegmentedControl更改圆角 - HelloWorld