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{

     

    }

  • 相关阅读:
    Java学习笔记-函数
    Java学习笔记-数组
    Git 常用命令速查表
    $.fn与$.fx什么意思; $.extend与$.fn.extend用法区别; $(function(){})和(function(){})(jQuery)
    offsetWidth的bug
    jQuery对象和DOM对象转换,解决jQuery对象不能使用js方法的问题
    1
    $().ready()与window.onload的不同
    offsetHeight在不同的浏览器下取值不同
    getElementsByName兼容ie 但并不是兼容ie下的所有标签
  • 原文地址:https://www.cnblogs.com/xujiahui/p/9544524.html
Copyright © 2011-2022 走看看