如何更改 UISeArchBar 的 iOS7 中的取消按钮色调颜色

2025-05-15 02:25:23
推荐回答(1个)
回答1:

更改 UISeArchBar 的 iOS7 中的取消按钮色调颜色
请尝试一些这样的事:
[[UIBarButtonItem appearanceWhenContainedIn:[UISearchBar class], nil] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],UITextAttributeTextColor,[NSValue valueWithUIOffset:UIOffsetMake(0, 1)],UITextAttributeTextShadowOffset,nil] forState:UIControlStateNormal];