标签:
前段时间遇到一个问题,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];
标签:
原文地址:http://www.cnblogs.com/jokervenus/p/4261723.html