2013-05-21 20 views
0

我已經找到了刷卡功能,我可以在我的應用程序中使用它。 https://github.com/YoonBongKim/SwipeMenuDemo 但問題是,當我使用時,我需要在Appdelegate.m中更改我的根視圖控制器。解決滑動功能(臉書)Xcode

YBSwipeViewController *swipeRootViewCntrlr = [[YBSwipeViewController alloc]  initWithMainViewController:mainNavigationCntrlr menuViewController:menuNavigationCntrlr]; 
self.window.rootViewController = swipeRootViewCntrlr; 

因此,我原來的viewcontroller不起作用。我的原始視圖控制器與其他控制器鏈接。我仍然可以刷卡。但是當viewcontroller需要從其他類調用時,應用程序會粉碎。我想知道該怎麼做。

+0

你收到了什麼崩潰報告? –

+0

我得到***由於未捕獲的異常'NSInvalidArgumentException'終止應用程序,原因:'+ entityForName:nil不是合法的NSManagedObjectContext參數搜索實體名'OBHistory'' –

+0

它只發生在我更改根視圖控制器時。 –

回答

0

我建議在GitHub去爲東西做完全一樣的東西,但是用317分 https://github.com/meiwin/MWFSlideNavigationViewController

我不是說你提供的類不工作,但它是一個容易得多,如果有一個項目背後的大社區。

+0

感謝您的幫助。但我需要拖動視圖和動畫。我需要使用UIPanGestureRecognizer。 –