首页 > 其他 > 详细

给uiview添加点击事件

时间:2015-01-30 14:34:56      阅读:270      评论:0      收藏:0      [点我收藏+]

前段时间遇到一个问题,navigation上的左侧返回按钮需要自定义,于是就给了一个view上去 代码如下

    UIView *leftitleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 54)];
    [leftitleView addSubview:lab];
    UITapGestureRecognizer *singleTap=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(cancel)];
    [leftitleView addGestureRecognizer:singleTap];
    self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc]initWithCustomView:leftitleView];

 

给uiview添加点击事件

原文:http://www.cnblogs.com/jokervenus/p/4261723.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!