iPad app crashes if minimumPrimaryColumnWidth set before presentsWithGesture = NO
|Product:||iOS + SDK
In our app we want to disable swiping the master view from the edge on iPads because it interferes with the user experience. Thus we set presentsWithGesture = NO for the split view controller. At the same time, we wanted to maintain a minimum 320 pt width of the master view, which seemed to be reduced to 309 pt since iOS 8.
A number of crash reports was discovered to be caused by this combination, specifically the order of which these two attributes were set. Our fix was to ensure presentsWithGesture = NO was called *before* minimumPrimaryColumnWidth was modified.
Steps to Reproduce:
Create a new Master-Detail Application (I use Objective C)
In AppDelegate.m, add the following two lines to application:didFinishLaunchingWithOptions:
splitViewController.minimumPrimaryColumnWidth = 320.0f;
splitViewController.presentsWithGesture = NO;
Launch application on an iPad device or simulator in portrait orientation.
On the detail view, swipe left then right without lifting your finger.
The application will now crash.
I would expect the application to behave identically, and not crash, regardless of the order of these two lines of code, since there is no documentation that suggests the ordering matters.
The application crashed because minimumPrimaryColumnWidth was set before presentsWithGesture = NO was specified.
iPad 4 mini
Reports posted here will not necessarily be seen by Apple.
All problems should be submitted at bugreport.apple.com before they are posted here.
Please only post information for Radars that you have filed yourself, and please do
not include Apple confidential information in your posts. Thank you!