UiswipegesturerecognizerDirectionRectionRectionRrection لا يعمل داخل DetailViewController.m مع iOS 5.1

StackOverflow https://stackoverflow.com//questions/9637752

سؤال

هذا هو سؤالي الأول، لكنني استخدم هذا الموقع كثيرا هذا الشهر الماضي (شكرا للجميع).

مشكلتي: لدي مشروع تقسيم عرض ل I-Pad.في DetailViewController، استخدم UITRTON. إليك بعض الكود من DetailViewController.h: giveacodicetagpre.

في DetailViewController.m أنا فقط أقوم بذلك: giveacodicetagpre.

الآن المشكلة هي: لقد كان يعمل تماما مع iOS 5.0.1 والسابق.الآن لا يعمل لفترة أطول.إنه يعمل لأي اتجاه آخر ولكن ليس للاتجاه الصحيح وفقط في DetailViewController !! يعمل فقط إذا ضربت iPad بالقوة والسرعة (مثل صفعة!)، ونفس الشيء بالنسبة للمحاكاة .. إنها تعمل فقط إذا قمت بالانهاء سريع جدا جدا!

أعتقد أنه خطأ .. ماذا علي أن أفعل؟ربما نشر نفس السؤال في منتدى أبل؟ شكرا لكم جميعا، أنت عظيم !! ماركو

هل كانت مفيدة؟

المحلول

I would guess that this has to do with the new "sliding presentation style" of the split view controller in iOS 5.1. The release notes say that you can disable this behavior by setting presentsWithGesture to NO.

Another option might be to implement gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer: in your gesture recognizer's delegate.

نصائح أخرى

I'm blatantly copying this answer from a fantastic tip on this StackOverflow page: Master Table Application

In your AppDelegate.m file, add this line at the end of your "didFinishLaunchingWithOptions" function:

splitViewController.presentsWithGesture = false;

Suddenly, right-swiping works again on Master-Detail pages.

(Relieved sigh.)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top