MonoTouch UISplitViewController - Device and Simulator different - ipad

Are there any known issues with UISplitViewController in MonoTouch? I am using MonoDevelop 2.8.8.4, MonoTouch 5.2.10 and xCode 4.3.2 (4E2002)
I have a UISplitViewController. When I go to portrait I display a button which the user can click to view the 'master' view in a popup controller. On the simulator it works exactly as expected - the master is displayed in a popupviewcontroller.
However, on the device (running iOS5.1), the master view will get pushed in from the side (like it would on a UINavigationController.PushController()

and this from iOS 5.1 Release Notes:
In 5.1 the UISplitViewController class adopts the sliding presentation
style when presenting the left view (previously only seen in Mail).
This style is used when presentation is initiated either by the
existing bar button item provided by the delegate methods or by a
swipe gesture within the right view. No additional API adoption is
required to obtain this behavior, and all existing API, including that
of the UIPopoverController instance provided by the delegate, will
continue to work as before. If the gesture cannot be supported in your
app, set the presentsWithGesture property of your split view
controller to NO to disable the gesture. However, disabling the
gesture is discouraged because its use preserves a consistent user
experience across all applications.

Are there any known issues with UISplitViewController in Monotouch?
Nothing specific to MonoTouch and UISplitViewController - but like you found out the later has changed quite a bit internally for iOS 5.1 and this can show up in applications.
I am using MonoDevelop 2.8.8.4, Monotouch 5.2.10 and xCode 4.3.2 (4E2002)
What's even more important is which version of the iOS simulator are you using ? i.e. iOS 5.0 or iOS 5.1 ?
In any case be aware that different version of iOS calls their selectors at different times. This can lead to cases where the same code will behave differently on different iOS versions.
One known case for this is about UISplitViewController. You can read about it (why and how it can occurs) and how to fix this properly to work identically across both versions of iOS.
Disclaimer: link to my own blog

Yes this is the "new Feature".
There is no Popover(UISplitViewController MasterView) anymore.
I tried to change but nothing works. I asked the Monotouch Support for help. But the also dont know anything.
Here is a Link to my Question maybe this can answer your question better;)
UISplitViewController problems with IOS 5.1

Related

Remove storyboard view controller iOS at build time

The fact is that I have a View Controller in my storyboard that is using StackViews. Now, I'm trying to make the application iOS 7 compatible but I don't want to remove that view controller. Is there a way to compile the project without that view controller? I tried to keep the build target of the storyboard to 9 but i would prefer if there is a way to hide that view controller at build time working with iOS 7 on the storyboard
Stack View came with iOS9 and you can't tell the Stack View to disappear depending on the running iOS. It's not possible to build the Storyboard depending on the iOS either. But it seems to be possible to select different storyboards depending on the used iOS. See this link. The cody is ojective-c, but it seems not that hard to transfer the logic.
You can either remove the Stack View or, what I'd suggest, build your App for iOS9, since some survey I've recently read, tells that up to 90% of all Apple Users upgrade to the newest iOS within a week. Your 3rd possibility is to build different storyboards depending on the iOS.
Edit: You may want to check out the OAStackView. Which implements most of the features from UIStackView and supports iOS 7+.

how to transition an older project whose UI is written by code to support Slide Over and Split View of iOS 9?

hi,I want to transition an an older project to support Slide Over and Split View of iOS 9,but I find all the demo projects I found was written by storyboard or xib, but my older project's UI is written by code, can any one suggest, thanks!
Just FYI.
I was not able to adopt Split View until disabled this setting in Project settings->Deployment Info->(Switch iPad)->Status Bar Style->Requires full screen.
I would suggest switching to storyboards to make your life easy.
I would highly recommend you watch the following WWDC videos and then think about what exactly you need to do in order to support multi tasking.
Mysteries of Auto Layout, Part 1
What's New in Storyboards
Implementing UI Designs in Interface Builder
Getting Started with Multitasking on iPad in iOS 9
Optimizing Your App for Multitasking on iPad in iOS
Just add LaunchScreen storyboard and set it as LaunchScreen from the General settings of your project. You can keep everything else as the code.

The detail view of a UISplitViewController takes full screen only on iOS8

My UISplitViewController was functioning properly until I compiled the project with the new SDK (iOS 8.0). At some point (when the (void)viewDidAppear:(BOOL)animated of the detail view controller is called) the detail view maximizes to the full screen, covering the master view.
I managed to fix it by using the new displayMode property of the UISplitViewController:
[self.splitViewController setPreferredDisplayMode:UISplitViewControllerDisplayModeAllVisible];
However this property is supported only in iOS8 and now I cannot build for iOS7. Is my only choice now is to download the old SDK?
It sounds like your app was running okay on iOS 7.1, so (happily) you only need to execute that code in versions of iOS that do support it. So what about:
if ([self.splitViewController respondsToSelector:#selector(setPreferredDisplayMode:)]) {
[self.splitViewController setPreferredDisplayMode:UISplitViewControllerDisplayModeAllVisible];
}
Compile with the new SDKs, and be able to run in old and new iOS. You then just need to set your build Deployment Targets appropriately.
Hope this helps.

Split View based Ipad App : View Changed from v5.0 to v.51

I m creating a Split view based application for Ipad. I have used the following code in my app to get split view in my app(http://blog.corywiles.com/creating-a-universal-ios-app-tutorial). While i was checking out, the code seems to show the result i expected in Ipad v5.0 , like a drop down list. But in Ipad v5.1 the popover view changed for the same code.
How can i get the same popover view ,which i got in v5.0 Ipad ..?
Ipad 5.0 Screenshot : http://postimage.org/image/bre31nai9/
Ipad 5.1 Screenshot : http://postimage.org/image/7waoz2rch/
This is a change Apple introduced with the iOS 5.1 SDK. To get the old behavior, either target iOS 5.0 SDK or (preferably), use MGSplitViewController, which offers similar functionality to the old UISplitViewController.
If you are still looking for a way to have iOS 5.0 style popover with the split view, I just spent the last couple of hours looking and came up with a solution that puts the "over" back in "popover". its here if you need it: splitview poperver issues between ios5.0 and ios5.1
be well.

Displaying different Launch Images based on IOS Version

I have a situation causing me to have a need to support two different launch images for Portrait orientation on iPads as the views will be different depending on the IOS version.
I'm developing iPad/iPhone app that supports a UISplitViewController as the root window when the device is an iPad. In IOS 5.0, supports the master view controller being displayed in split view while in portrait mode by responding "NO" in the shouldHideViewController UISplitViewControllerDelegate method. In IOS 4.2, this method is not called and thus the Master View Controller is not displayed in Portrait orientation. Instead, it is a popover presented when a Nav button is pressed.
Is there a way to create a single version of the application (from an iTunes customer perspective) that includes the appropriate launch image based on IOS version?
The iPhone App Programming Guide within the Advanced Tips and Tricks section describes how different launch images can be specified based on platform and device, but no IOS version as so: key_root-platform~device
Another post's answer indicated that I may be able to solve a similar problem by creating multiple targets to support multiple versions. Is it possible to create multiple targets and upload them to Apple as a single application and have them distribute the appropriate binaries based on version? Any tips on how would be greatly appreciated.
No, there is no way to do what you are asking for. Your best bet is to come up with some launch image that's not trying to be a faithful reproduction of what your home screen is.
Could you not just show the split view with the popover/sidebar closed in landscape view? That way it will look much the same for iOS4 and iO5.
I think you can accomplish this by creating a custom splash screen. Then you can perform a runtime check and load the appropriate image based on the iOS version. I have seen custom splash screens before (eg animated splash screens).
I think you would overide startupImageWithOrientation:, see this post more for info.
As for your question about having multiple targets be one app, the answer is no.

Resources