• iOS Button添加阴影 和 圆角


    用iamgeview 加手势代替

     self.headimageview = [[UIImageView alloc] initWithFrame:CGRectMake(IPHONEWIDTH(13), statusRect.size.height+IPHONEWIDTH(16), IPHONEWIDTH(119), IPHONEWIDTH(119))];

       

        self.headimageview.image=UIimageName(@"homeimages");

        //    阴影

        self.headimageview.layer.shadowColor = Colorgray.CGColor;

        self.headimageview.layer.shadowOffset = CGSizeMake(2, 2);

        self.headimageview.layer.shadowOpacity = 0.7;

        self.headimageview.layer.shadowRadius = 3;//阴影半径,默认3

        

        self.headimageview.userInteractionEnabled = YES; //响应点击

        UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showLeftMenu)];

        [self.headimageview addGestureRecognizer:tapGesture];

        

        [self.view addSubview:self.headimageview];

     

     

     

     

     

     

    -(void)showLeftMenu{

     

    }

  • 相关阅读:
    括号序列
    乘积最大
    装箱问题
    开心的金明
    金明的预算方案(有依赖的背包问题)
    砝码称重
    (枚举)算法竞赛入门经典(7.1.2)最大乘积
    (枚举)算法竞赛入门经典(7.1.1)除法
    Zabbix历史数据清理
    sonarqube6.7.1使用
  • 原文地址:https://www.cnblogs.com/xujiahui/p/9544524.html
Copyright © 2020-2023  润新知