您的位置:首页 > 产品设计 > UI/UE

ios7 UISearchBar

2013-10-28 15:41 267 查看
if(IOS7BC){

UIView *topView =
VTOSearchBar.subviews[0];

UIButton *cancelButton;

for (UIView *subView
in topView.subviews) {

if([subView
isKindOfClass:[NSClassFromString(@"UINavigationButton")
class]]) {
cancelButton = (UIButton*)subView;

[cancelButton setBackgroundImage:[UIImage
imageNamed:@"xxx.png"]
forState:UIControlStateNormal];
[cancelButton
setEnabled:YES];
cancelButton.userInteractionEnabled =
YES;
[cancelButton
setTitle:@"发布活动" forState:UIControlStateNormal];
}
}
}else{
[VTOSearchBar
setTintColor:Bar_COLOR];

for(id cancelbutton
in [VTOSearchBar
subviews])//将取消键换成发布活动
{

if([cancelbutton isKindOfClass:[UIButton
class]])
{

UIButton *btn = (UIButton *)cancelbutton;
[btn
setEnabled:YES];
btn.userInteractionEnabled =
YES;
[btn
setTitle:@"发布活动" forState:UIControlStateNormal];


}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: