iphone - 当 View 的类为 TPKeyboardAvoidingScrollView 时,UIButton 不会在模拟器上显示

标签 iphone ios objective-c scrollview

我遇到了一个奇怪的问题,当 View 的类设置为 TPKeyboardAvoidingScrollView 时,模拟器或我的 iPhone 上的按钮不会显示。

截图如下:

enter image description here

当 View 的类设置为 UIView(默认)时,它可以正常工作。

最佳答案

参见this post获取说明。

For non-UITableViewControllers, use it as-is by dropping the TPKeyboardAvoidingScrollView source files into your project, popping a UIScrollView into your view controller’s xib, setting the class to TPKeyboardAvoidingScrollView, and putting all your controls within that scroll view.

To use it with UITableViewController, pop the TPKeyboardAvoidingTableView source files in, and just make your UITableView a TPKeyboardAvoidingTableView in the xib — everything should be taken care of.

您使用它时是否带有UITableViewController?确保您已将该按钮嵌入到 UIScrollView 中。上面链接的网站还有一个示例项目,您可以引用以获取更多帮助。

关于iphone - 当 View 的类为 TPKeyboardAvoidingScrollView 时,UIButton 不会在模拟器上显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16630333/

相关文章:

javascript - 苹果手机SDK : How to get rid of the action sheet in UIWebView?

iphone - UISearchDisplayController,对 UITableView 的引用是什么?

ios - View 在方向更改时旋转时的黑色背景

objective-c - 如何从iPhone应用程序中的服务器播放视频URL

ios - 如何在 UIViewController 和 UIView 之间进行协调

iphone - 从应用商店安装时使 iPhone 应用付费版本替换免费版本

iphone - 网络事件指示器应该始终处于事件状态吗?

ios - 适用于不同iDevice的自适应布局UICollectionViewCell大小

ios - 如何为 Core Data 中的二进制数据启用外部存储

android - iPhone 到 Android/PC 蓝牙连接