码迷,mamicode.com
首页 > 移动开发 > 详细

iOS--圆角按钮

时间:2017-01-11 15:43:27      阅读:345      评论:0      收藏:0      [点我收藏+]

标签:with   应用   page   uicolor   anim   make   tle   1.0   圆角按钮   

//进入按钮
    UIButton *enterMainButton = [[UIButton alloc] initWithFrame:CGRectMake(65, self.PageHeight-120,250 , 45)];
    enterMainButton.layer.borderWidth = 1;
    enterMainButton.layer.cornerRadius = 24;
    enterMainButton.layer.borderColor = [UIColor colorWithRed:108/255.0 green:122/255.0 blue:149/255.0 alpha:1].CGColor;
    [enterMainButton setTitle:@"进入应用" forState:UIControlStateNormal];
    enterMainButton.titleLabel.font = [UIFont systemFontOfSize: 14.0];
    [enterMainButton setTitleColor:[UIColor colorWithRed:108/255.0 green:122/255.0 blue:149/255.0 alpha:1]forState:UIControlStateNormal];
    
    enterMainButton.showsTouchWhenHighlighted = YES;
    enterMainButton.alpha = 0;
    
    [enterMainButton addTarget:self action:@selector(intoButtonClick:) forControlEvents:UIControlEventTouchUpInside];
    
    
    [UIView animateWithDuration:3.0 animations:^{
        enterMainButton.alpha = 1.0;
    }];

 

iOS--圆角按钮

标签:with   应用   page   uicolor   anim   make   tle   1.0   圆角按钮   

原文地址:http://www.cnblogs.com/qiyiyifan/p/6273798.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!