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];
}
}
}