uisplitviewcontroller

Split view controller must be root view controller

♀尐吖头ヾ 提交于 2019-11-27 04:00:51
问题 Whenever I try to present a UISplitViewController modally the application crashes. Thus it must allways be the root view controller. Can anyone confirm that? 回答1: From the Apple iPad Programming Guide: The split view controller’s view should always be installed as the root view of your application window. You should never present a split view inside of a navigation or tab bar interface. So yes, you cannot present a split view outside of your main application window (that includes modally).

How to use a UISplitViewController as a Modal View Controller?

无人久伴 提交于 2019-11-27 03:31:32
问题 I am trying to display a UISplitViewController presenting it as a Modal View Controller in my iPad app. I manage to have it display, but for some reason there is a gap to the left of the modal view the size of a Status Bar which is also preserved when the orientation is changed. Does anybody know why this is happening? Or if this is even possible? Maybe I'm just digging myself a huge hole. 回答1: The stock UISplitViewController was designed for use as the root view controller only. Presenting

Storyboard, UIViewController and UISplitViewController

泪湿孤枕 提交于 2019-11-27 03:14:55
问题 Trying to make storyboard based application for iPad. In it I need to transition from start screen (UIViewController) to main screen (UISplitViewController) and then to full-screen view (again UIViewController). I saw a number of discussions on the web (at least several - on stackoverflow), stating that UISplitViewController can't be used in Storyboard based application any other way than being RootViewController. Some threads contain workarounds and there's also alternative splitview (https:

UISplitViewController: remove divider line

99封情书 提交于 2019-11-27 01:35:41
问题 When using UISplitViewController on the iPad there's a black vertical divider line between the root and detail view. Is there any way to remove this line? Thanks 回答1: Excellent answer by @bteapot. I tested this and it works, even gets rid of the line between master/detail nav bars. You can do this in storyboard by adding the "gutterWidth" key path and the value 0 to the USplitViewController runtime attributes. 回答2: Actuly I have some modification to answer of (Dylan) 's answer in the

How to hide & unhide Master View Controller in SplitView Controller

不想你离开。 提交于 2019-11-27 01:33:46
问题 I have created a new split view based project in my XCode 4.2 Then in DetailViewController.m file i have add this method - (BOOL)splitViewController: (UISplitViewController*)svc shouldHideViewController:(UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation { //This method is only available in iOS5 return NO; } Now by doing this i can able to show both left & right part of my splitview Controller at a time. Now i have added a UIBarButtonItem in my DetailViewController

How to hide master view in UiSplitviewcontroller in ipad

…衆ロ難τιáo~ 提交于 2019-11-27 01:04:51
问题 Is there is any way to hide the master view in a splitviewcontroller programmatically. In my application the first screen will be of a splitviewcontroller, i don't need any split view for the next screens. How i can achieve this 回答1: Matt Gemmell created an excellent custom splitViewController called "MGSplitViewController". It is very easily implemented, heavily commented, and contains a lot of excellent features not found with a normal splitViewController (hide master view on landscape view

CoreData Edit/Overwrite Object

我怕爱的太早我们不能终老 提交于 2019-11-27 00:47:13
问题 I am playing around with a new project, a split view iPad app using Core Data , and I was wondering, as its fairly clear how to add and remove an item. If I was to say alter this to hold text, then that text be shown in a UITextView , how can I edit or overwrite an object in CoreData ? So the user types their note in the UITextView and when they leave that it edits and saves the note (object in the table view) they have currently selected. Appreciate any help thanks. 回答1: You simply request

Change the width of Master in UISplitViewController

本小妞迷上赌 提交于 2019-11-26 22:02:25
The iPad programming guide says that the splitView's left pane is fixed to 320 points. But 320 pixels for my master view controller is too much. I would like to reduce it and give more space to detail view controller. Is it possible by anyway? Link to the document which speaks about fixed width. If you subclass UISplitViewController, you can implement -viewDidLayoutSubviews and adjust the width there. This is clean, no hacks or private APIs, and works even with rotation. - (void)viewDidLayoutSubviews { const CGFloat kMasterViewWidth = 240.0; UIViewController *masterViewController = [self

Open UISplitViewController to Master View rather than Detail

无人久伴 提交于 2019-11-26 19:15:32
问题 I have a split-view interface with a target iPhone 6 application. On the first launch of the application, it opens to the Detail View; I would like it to open to the Master View. I have tried: self.splitViewController?.preferredDisplayMode = UISplitViewControllerDisplayMode.PrimaryOverlay Which was suggested elsewhere (Prior StackOverFlow Question) but it doesn't seem to do anything, and does not open the Master view on launch. I also tried to add the following line to my AppDelegate:

Best way to switch between UISplitViewController and other view controllers?

笑着哭i 提交于 2019-11-26 17:43:11
I'm authoring an iPad app. One of the screens in the app is perfectly suited to using a UISplitViewController. However, the top level of the app is a main menu, which I don't want to use a UISplitViewController for. This presents a problem, because Apple state that: UISplitViewController should be the top level view controller in the app, i.e. its view should be added as the subview of UIWindow if used, UISplitViewController should be there for the lifetime of the app -- i.e. don't remove its view from UIWindow and put another in place, or vice versa Having read around and experimented, it