UIScrollView在所有模拟器上滚动,但不在我的iPhone上滚动 [英] UIScrollView scrolls on all the simulators but not on my iPhone

查看:92
本文介绍了UIScrollView在所有模拟器上滚动,但不在我的iPhone上滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此在弄清楚scrollView如何工作之后,我用以下代码实现了它:

So after figuring out how scrollView works, I've implemented it with the following code:

self.scrollView.delegate = self;
self.scrollView.userInteractionEnabled = YES;
CGRect view = CGRectMake(0, 0, 320, 750);
self.scrollView.contentSize = view.size;

以上代码适用于Xcode 6中的所有模拟器。但是,当我运行它时,我的手机(ios7上的iphone4s),滚动功能根本不起作用。自新版本发布以来,人们是否遇到过同样的问题?或者我错过了我从文档中学到的东西?

The above code works as intended on ALL simulators in Xcode 6. However, when I run it my phone (iphone4s on ios7), the scroll does not function at all. Are people experiencing the same problems since the new release? Or am I missing something I've learned from the documentation?

推荐答案

我没有尝试Vishu的回答,但我做的是更新到iOS 8,因此它与Xcode 6兼容,并且有效!

I did not try Vishu's answer, but what I did was update to iOS 8 so it's compatible with Xcode 6 and it worked!

这篇关于UIScrollView在所有模拟器上滚动,但不在我的iPhone上滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆