不能在UIPageViewController里实现UITextview
我有一个奇怪的问题,我有一个页面的应用程序,其中一个页面我使用了一个UITextView
,但是当我点击UITextView
它移动到下一个页面,不能写任何东西。
当我使用UIPageViewControllerTransitionStylePageCurl
时没有问题。 唯一的问题是与UIPageViewControllerTransitionStyleScroll
。 任何人都知道解决scheme 请帮帮我
我自己碰到了同样的问题,看来这是一个UITextField或UITextView成为UIScrollView内第一个响应者时发生的一些默认行为的结果。
阻止您的UITextView滚动UIPageViewController的解决scheme是先将其embedded到UIScrollView中,而不是直接embedded到页面的主视图中。
这是因为当UITextView成为第一响应者时,它将searchUIScrollViewtypes的视图层次结构中最早的超级视图,并且将滚动该视图以适应覆盖屏幕的键盘。 如果你不把UITextView包装在UIScrollView中 ,你的UIPageViewController的内部UIScrollView将被选中并滚动,产生不需要的行为。
你可以参考下面的链接..
UIPageViewControllerTransitionStylePageCurl – http://developer.apple.com/library/ios/#documentation/uikit/reference/UIPageViewControllerClassReferenceClassRef/UIPageViewControllerClassReference.html
UIPageViewControllerTransitionStyleScroll – http://developer.apple.com/library/ios/#documentation/uikit/reference/UIPageViewControllerClassReferenceClassRef/UIPageViewControllerClassReference.html
- 随机UISearchDisplayController崩溃(iOS 7)
- iPad iOS7 – UIPopoverController中的UIImagePickerController有错误的预览图像
- 使用.sks文件来布局复杂的对象与SKScene文件
- iOS SDK Interface Builder的RGB滑块产生与UIColor和RGB不同的颜色
- 拖动+旋转使用UIPanGestureRecognizer触摸下车轨道
- 使用AFHTTPRequestOperation AFNetworking 2authentication
- iOS代码签名教程系列
- Swift中`关键字的含义?
- 我如何监视WKWebview的请求?