使用 iOS 4.0 库时的向后兼容性
我希望使用 UISwipeGestureRecognizer
为我的应用程序实现类似推文的界面。 (用检测滑动时的自定义视图替换 tableview 单元格的视图)但是,此 API 仅在 iOS 3.2+ 版本中添加。我需要支持所有运行操作系统版本 3.0+ 的设备,所以我不确定在这种情况下该怎么做。当苹果已经做到了这一点时,我自己实现滑动检测似乎是一种可怕的浪费精力(更不用说最终可能会得到较低质量的输出),但看起来这是一个相当常见的情况。我应该如何处理这个问题?
提前致谢,
泰贾。
I'm looking to use UISwipeGestureRecognizer
for implementing a tweetie like interface for my application. (Replacing the view of a tableview cell with a custom view on detecting a swipe) However, this API was added only in version 3.2+ of iOS. I need to support all the devices running OS versions 3.0+, so I'm not sure what to do in this scenario. It seems to be a terrible waste of effort to implement the swipe detection myself when Apple has already done it (not to mention the possibility of ending up with a lower quality output), but it looks like it's a fairly common scenario. How should I handle this?
Thanks in advance,
Teja.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您已经非常准确地量化了问题。
简而言之,你不能使用它<3.2。即使它作为未记录的 API 存在,Apple 也会拒绝该应用程序这样做。
我认为您“可以”支持 >=3.2,因为我相信现在大多数人都在使用它 - 但我只是即兴发言。
在发布 4.0 以下的应用程序时,我们也遇到了这些相同的问题 - 想要添加多任务支持等内容 - 并切断 3.x 用户。
Apple应该允许多个应用程序版本支持多个操作系统版本 - 但是 - 他们没有!
很抱歉这个坏消息 - 但我现在正在解决类似的问题,为 iPad (3.2) 和 iPhone (4.0) 制作通用应用程序 - 基本上必须在多任务处理或 iPad 支持!
You have quantified the problem quite accurately.
In short, you can't use it <3.2. Even if it existed as an undocumented API, Apple would reject the app for doing so.
I think you're "okay" with supporting >=3.2 as I believe the lion's share of people use that now - but I'm just speaking off the cuff.
We have these same issues when releasing apps under 4.0 - wanting to add stuff like Multitasking support - and cutting off 3.x users.
Apple should allow multiple app versions to support multiple OS versions - but - they don't!
Sorry for the bad news - but I'm in the middle of sorting out a similar issue right now, making a universal application for iPad (3.2) and iPhone (4.0) - and having to basically choose between multitasking or iPad support!