zoukankan      html  css  js  c++  java
  • 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{

     

    }

  • 相关阅读:
    指针与数组实例练习(指针运算)
    C语言数组和函数实例练习(二)
    C语言数组和函数实例练习(一)
    近一个月的学习总结(4.8—5.12)
    Java网页小程序——Java Applet
    数据结构(二)线性表——链表
    JDBC的使用(MySQL数据库)
    Python变量类型及变量
    Shell编程语法
    文本处理三剑客
  • 原文地址:https://www.cnblogs.com/xujiahui/p/9544524.html
Copyright © 2011-2022 走看看