ios - 禁用 UISearchBar

标签 ios objective-c xcode ios5 uisearchbar

我有一个 - 如我所愿 - 非常简单的问题:如何在 IOS5 中禁用 UISearchBar 以避免用户交互?我找不到 setEnabled 或类似的东西...

谢谢!

最佳答案

你试过吗:

[searchBar setUserInteractionEnabled:NO];

?

关于ios - 禁用 UISearchBar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9169049/

相关文章:

ios - WatchKit 和应用程序之间核心数据实时同步

objective-c - 如何实现 UITextView.hidden

ios - MMDrawerController 我需要在哪里添加 sidemen 按钮?

xcode - 将第二个 Interface Builder XIB 文件基于现有文件

iOS 9.3.1 Xcode 7.3 "Unable to copy symbols from this device"

ios - setNeedsDisplayInRect : causes the whole view to be updated

ios - 我如何自动更新 bool 变量的值

ios - 我如何解决 iPhone 4 5 6 6+ 中的图像自动调整大小问题

objective-c - 通过 Cocoa API 获取机器类型和其他硬件详细信息

ios - Xcode/iTunesConnect : Is it possible to remove watch kit target and add it back or not submit the watchkit App?