从一个界面跳到下一个界面,这个功能不难实现,But:根据UI给的设计图,下一个界面需要更改返回按钮的样式只有一个< 这样的返回按钮,UI这样设计的话,系统自带的返回就不能用了,在开发过程中作为一个有经验的开发者,都会自己去自定义一些东西,当然了,有相应的第三方类库就更好了,但各种各样的问题也会出现,由于代码不是自己写的,所以修改起来也比较头疼
言归正传:
问题描述:
最近一个项目中运用到了搜索的功能其中需要跳到搜索列表页面有热门搜索词展示,这一块儿我运用到了第三方PYSearchViewController这个封装的控件,主要任务就是在搜索热词界面上面搜索框左边添加 一个返回按钮 <
问题解决方案:
UIButton* BackBT = ({
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[buttonsetImage:[UIImage imageNamed:@"icon_Lift"] forState:UIControlStateNormal];
[buttonaddTarget:self action:@selector(searchButtonBack) forControlEvents:UIControlEventTouchUpInside];
button.frame=CGRectMake(0,0,40.0f,40.0f);
button;
});
UIView*leftCustomView = [[UIViewalloc]initWithFra