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{

     

    }

  • 相关阅读:
    win7开启Administrator账户
    二叉树遍历
    使用NAnt提高工作效率(二)
    系统服务的最简单实现
    右键附加启动命令行
    C#开发奇技淫巧二:根据dll文件加载C++或者Delphi插件
    百度原CTO李一男经典语录
    Sql开发技巧
    使用NAnt提高工作效率(一)
    对获取config文件的appSettings节点简单封装
  • 原文地址:https://www.cnblogs.com/xujiahui/p/9544524.html
Copyright © 2011-2022 走看看