show rootview controller (uitableviewcontroller subclass) in splitview in portrait mode - xcode

I want to show rootview controller(uitableviewcontroller sublass) in splitview in portrait mode which is by default hidden.when i switch to landscape mode its visible but i want to show this in portrait mode also.
thanx for any help.

This is not possible using the standard UISplitViewController class. Apple has a private API they use to do this same thing in the Settings app. Take a look at this MGSplitViewController which should allow you to achieve the same effect without breaking the private API rules.

Take a look at APSplitViewController.

Related

How to make Sure Keyboard is not placed over an Entry when it is focused in Xamarin?

I have an Entry which is placed in a ContentView, and this ContentView is placed in a Grid. When this Entry is Focused, the Keyboard is placed over the ContentView preventing the user from seeing the Entry.
I would like to know if there is a way to determine if a View is Visible and if not make sure it is (prevent the Keyboard from being placed over it).
Any thoughts on how I could do this.
I would need this to work on iOS specifically, Android and Windows seem not to have this issue in my use-case.
On Android platform, the official document provides Soft Keyboard Input Mode. Refer to https://learn.microsoft.com/en-us/xamarin/xamarin-forms/platform/android/soft-keyboard-input-mode for details.
On IOS platform, you can query KeyboardOverlap installation in IOS's nuget, and then add KeyboardOverlapRenderer.Init (); in AppDelegate to achieve the effect in IOS.

How to incorporate a UISearchController into new (iOS8) UISplitviewController

I try to build a simple app based on the UISplitViewController template from Xcode 6 for universal apps (with Storyboard and CoreData/NSFetchedResultsController). This app should also provide a search bar for the MasterViewController. Unfortunately, Xcode 6 provides no InterfaceBuilder element for the UISearchBar/UISearchController combo (only the depreciated UISearchBar/UISearchDisplayController).
In the iOS Developer library, Apple provides the "Table Search with UISearchController" example, but this is not based on the UISplitViewController and supports only iPhone.
My problem is, that I'm not able to show the detail view on the correct ViewController under all circumstances. I tried to transfer the approach from the Apple example project to the UISplitViewController template. In this, one is encouraged to show the search results in a separate UITableViewController subclass (ResultsTableViewController) and use this as the searchResultsController of the UISearchController. I was not able to create a scene in InterfaceBuilder for this setup so I had to add these manually in code.
The problems begin when I click on a table cell of the ResultsTableViewController. This vc is not part of the scene in InterfaceBuilde and I don't know how to add it to the SplitViewController setting correctly. The biggest problem is the weird behavoir of the iPhone 6 Plus and the UISplitViewController. In portrait mode it behaves like an iPhone and doesn't seem to have a SplitViewController and only uses a NavigationController to which I push my DetailViewController. In landscape mode it behaves like an iPad with SplitViewController were I have to get the second ViewController of the SplitViewController childControllers and push the DetailViewController on this one.
Now it happens, when I start in portrait mode and switch to landscape mode that the DetailViewController is all gone, showing gray space where the DetailVC should be. It seems, when going to portrait mode, the DetailViewController gets kicked from the SplitViewController (or the SplitViewController gets kicked at all in favor for the iPhones NavigationController setup). When switching back to landscape the SplitViewController is initialized again but without proper initialization of the DetailViewController.
Is there any template or suggestion on how to correctly implement search capabilities on a universal UISplitViewController?
Cheers
Björn

iOS 7 force landscape on a UIViewController with UINavigationController

In my app I want one view controller to be shown in landscape because it is a signature pad. The rest of the views are portrait. I can force the view to be landscape without a problem as long as it is not embedded in a Navigation Controller. The problem is that I want the Navigation bar to show also. Does anyone know a workaround for this?
You can either present your view controller instead of push using UINavigationController (See kjam's solution in the following link) or you may try this solution of arpan_techisavy.

Xcode 4.5 build Device IOS 5.1

I'm running on Mt Lion with Xcode 4.5.1 installed.
By default, when I build and deploy to a iOS 5.1 device, the display would rotate when I rotate the device but it doesn't seems to work when I deploy to either the iOS 6 simulator or my iPad or iPhone running iOS 6.
Is there something I'm missing here?
Please read the following, hope it help. (referencehttp://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html)
Handling View Rotations
In iOS 6, your app supports the interface orientations defined in your app’s Info.plist file. A view controller can override the supportedInterfaceOrientations method to limit the list of supported orientations. Generally, the system calls this method only on the root view controller of the window or a view controller presented to fill the entire screen; child view controllers use the portion of the window provided for them by their parent view controller and no longer participate in directly in decisions about what rotations are supported. The intersection of the app’s orientation mask and the view controller’s orientation mask is used to determine which orientations a view controller can be rotated into.
You can override the preferredInterfaceOrientationForPresentation for a view controller that is intended to be presented full screen in a specific orientation.
In iOS 5 and earlier, the UIViewController class displays views in portrait mode only. To support additional orientations, you must override the shouldAutorotateToInterfaceOrientation: method and return YES for any orientations your subclass supports. If the autoresizing properties of your views are configured correctly, that may be all you have to do. However, the UIViewController class provides additional hooks for you to implement additional behaviors as needed. Generally, if your view controller is intended to be used as a child view controller, it should support all interface orientations.
and this link may be helpful for you http://www.cocos2d-iphone.org/forum/topic/40721
there are some interesting comment from the link above -> Try to override the shouldAutoRotate method on the rvc, and put the conditional there. As far as I have tested, the shouldAutoRotateToInterfaceOrientation isn't called on iOS6 even with all fixes applied, so I was forced to override several more methods.
please give me a feedback, thanks :)

iPad SplitView as subview

I'm dealing with an iPad project that manages a custom menu and a subview with different stuff on in it, now i want to try to put on this subview a splitview. Is it possible? How can I do it? How can I build my splitview without any template?
The Apple human interface guidelines forbid this and say that the UISplitViewController must be installed as the Root View Controller so it would be best to redesign your app with this in mind since they will not approve it when submitted for review otherwise.
Whilst this is an old question it's still worth adding that Apple seem to have relaxed their rules. I have had a couple of apps approved that have a SplitView inside a TabBar.

Resources