uisplitviewcontroller

UISplitViewController : how to present master view in the detail view by button event instead of via a swipe gesture

ⅰ亾dé卋堺 提交于 2019-12-11 10:15:53
问题 Swipe gesture is cool to present master view in portrait orientation. But I want to know how to present the table by button event instead of via a swipe gesture. I do not want to present popover, I like the slide animation. Any comments will be appreciated. 回答1: For future reference, by setting the split view controller delegate and implementing this two methods you should be ready to go. - (void)splitViewController:(UISplitViewController *)svc willShowViewController:(UIViewController *

How can I prepare a UISplitViewController secondary VC for a change to displayMode?

吃可爱长大的小学妹 提交于 2019-12-11 10:03:22
问题 In iOS8, UISplitViewController changed, and now notifies its delegate of a pending displayMode change via splitViewController:willChangeToDisplayMode: . I need to update some aspects of my secondary view controller in response to this change. It's simple enough to call methods on the secondary VC during this delegate method, but the VC doesn't yet know what its new bounds will be. Is there a reasonable way to be notified that the bounds of the VC will change, apart from KVO on the bounds of

Remove split view and show another xib in the whole screen

青春壹個敷衍的年華 提交于 2019-12-11 07:45:17
问题 I have created an iPad app. In the middle of the app, under a button I have added a split view. After the button is clicked the split is shown successfully. But in the split view I want to add a button. When the button is tapped then I want to remove the split view and show another xib in whole screen. How can I do that? 回答1: First I had some questions, if you able to add a Splitview on top of a viewcontroller with its button click? In the above case do you get orientation in splitview

Replace segue creating new instance

半腔热情 提交于 2019-12-11 07:28:43
问题 I've run into a problem with a SplitViewController app. When I select a row from the table in the master view I'm replacing the detail view with a replace segue. The problem is each time this happens it creates a new instance/reloads the detail view controller. Is there any way I can have it so it will replace the detail view with the previous instance if it has already been instantiated. I'd like the state for the detail views to be remembered, such as input into textfields. 回答1: Cannot be

Changing the master view in Split View does not update the popover in portrait

怎甘沉沦 提交于 2019-12-11 07:20:11
问题 I've got an app using the a split view controller and I'm setting the master and detail view controllers in the App delegate. However, depending on user interaction (them touching a UIButton), I am changing the master view, by accessing the viewcontrollers array of the split view controller. The problem is, when I do this, and then change the orientation of the iPad to portrait, and access the master view via the popover, it is showing the previous master view, and not the new one I had set.

Coding custom SplitViewController - when should I call viewWillAppear, viewDidAppear, etc…?

こ雲淡風輕ζ 提交于 2019-12-11 07:06:15
问题 I'm writing my own SplitViewController from scratch (i.e. by subclassing UIViewController and not UISplitViewController ). It has two sub-viewControllers (one for the left panel and one for the detail right panel), to which I need to send the appropriate messages ( viewWillAppear, viewDidAppear, viewWillDisapppear and viewDidDisappear ). I am already forwarding those messages when my custom SplitViewController receives them and it works fine. However I am struggling to figure out when to send

UISplitViewController toggleMasterVisible method. Where is the method defined?

≯℡__Kan透↙ 提交于 2019-12-11 05:50:36
问题 I can call properly "toggleMasterVisible" method as a Button action but I want to expand the method like this. (In Button action. It works) .h @interface DetailViewController : UIViewController <UISplitViewControllerDelegate> @end .m UIBarButtonItem *listBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"list.png"] style:UIBarButtonItemStyleBordered target:self.splitViewController action:@selector(toggleMasterVisible:)]; (I want to expand the method) .m

Animate visibility of master detail controller of UISplitViewController

痞子三分冷 提交于 2019-12-11 04:53:40
问题 In my UISplitViewController, I want the master view controller to only be allowed to display when in Portrait orientation or when my detail view controller is not displaying a type of controller, MyFullScreenViewController . I've implemented the UISplitViewControllerDelegate to indicate this appropriately. -(BOOL)splitViewController:(UISplitViewController *)svc shouldHideViewController:(UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation { if

iPad split view dimension parts

北城余情 提交于 2019-12-11 04:17:43
问题 I have an app that needs backgrounds for both parts of the split view. If the whole screen is 1024 x 768 , what is the size of each part? left : w:xx px ; h: 768px right: w:xx px ; h: 768px 回答1: The split view's master is 320 px wide according to the documentation, leaving the detail pane a comfortable 768 or 704 px wide depending on the orientation of the device. 来源: https://stackoverflow.com/questions/10004771/ipad-split-view-dimension-parts

How to Navigate from Initial UIViewController to UISplitViewController in Swift

心不动则不痛 提交于 2019-12-11 03:56:09
问题 I am showing my details in UISplitViewController in AllVisible mode. But, before that, loginViewController is there. User should login, then it will navigate UISplitViewController. I don't know how to navigate to that viewController. I am not using any UINavigationController inside my app. I have tried something, but failure. I used following code: Code: //ATTEMPT 1: self.performSegueWithIdentifier("split", sender: self) //ATTEMPT 2: let leftVC = atlMasterVC() let detailVC = atlDetailVC() let