gpt4 book ai didi

iphone - 自定义 UISearchDisplayController

转载 作者:行者123 更新时间:2023-12-03 18:58:20 28 4
gpt4 key购买 nike

alt text http://img210.imageshack.us/img210/5992/searchdisplaycontroller.png

以下对象可以自定义吗?

<强>1。 UISearchBar 范围按钮 (UISegmentedController)

<强>2。 UIResultsTableView

<强>3。键盘(至少是黑色的)

最佳答案

alt text http://img527.imageshack.us/img527/9775/searchdisplaycontrollerz.png

我能够通过某种黑客代码更改分段控件:

- (void)searchDisplayControllerWillBeginSearch:(UISearchDisplayController *)controller {
for (UIView *subview in self.view.subviews) {
for (UIView *subview2 in subview.subviews) {
if ([subview2 isKindOfClass:[UISegmentedControl class]]) {
UISegmentedControl *segmentedControl = (UISegmentedControl *)subview2;
segmentedControl.tintColor = [UIColor blackColor];
segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar;
}
}
}}

但是按钮太大了,我该如何修复它,使它们和原来的一样漂亮?

关于iphone - 自定义 UISearchDisplayController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1559676/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com