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{

     

    }

  • 相关阅读:
    经典SQL语句
    PL/SQL第二课(作业)
    CVS的使用(一课时)
    无法连接到Visual Studio 的Localhost Web服务器
    Oracle第三课(学习中笔记)
    PL/SQL第一课(学习笔记)
    Oracle第一课(学习中笔记)
    值类型——《.NET 2.0面向对象编程揭秘 》
    今日无事,将一同志之毕设完结
    第10组 Beta冲刺 (1/5)(组长)
  • 原文地址:https://www.cnblogs.com/xujiahui/p/9544524.html
Copyright © 2011-2022 走看看