ios - UISplitViewController presentsWithGesture = YES not working -



ios - UISplitViewController presentsWithGesture = YES not working -

in appdelegate in application:didfinishlaunchingwithoptions: instantiate uisplitviewcontroller next code:

popmenuviewcontroller *menuvc = [[popmenuviewcontroller alloc] initwithstyle:uitableviewstyleplain]; uinavigationcontroller *menunavcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:menuvc]; popmenudetailviewcontroller *detailvc = [[popmenudetailviewcontroller alloc] initwithnibname:@"popmenudetailviewcontroller" bundle:nil]; uinavigationcontroller *detailnavcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:detailvc]; menuvc.detailviewcontroller = detailvc; splitviewcontroller = [[uisplitviewcontroller alloc] init]; splitviewcontroller.viewcontrollers = @[menunavcontroller, detailnavcontroller]; splitviewcontroller.presentswithgesture = yes; splitviewcontroller.delegate = self; self.window.rootviewcontroller = splitviewcontroller;

but, in portrait mode, when slide on screen (from left right) left view controller doesn't appear (but presentswithgesture set yes).

i run project on simulator , physical device ios 7.

any ideas?

on ios 7, must implement delegate method uisplitviewcontroller in order gesture work:

-(void)splitviewcontroller:(uisplitviewcontroller*)splitcontroller willhideviewcontroller:(uiviewcontroller*)viewcontroller withbarbuttonitem:(uibarbuttonitem*)barbuttonitem forpopovercontroller:(uipopovercontroller*)popovercontroller

edit: don't need within method, needs implemented.

ios objective-c ipad uisplitviewcontroller

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -