Master-Detail Application - Show master view at the right of the application not left

StackOverflow https://stackoverflow.com/questions/20968236

  •  25-09-2022
  •  | 
  •  

سؤال

The master detail application shows the master view controller at the left of the application,which is perfect for English data entries and handling.
But if i want to show the master view at the right of the application, in a Right-To-Left kind of way, suitable for Arabic entries, how can i change the position of the master view and force it to load from the right side of the application?

هل كانت مفيدة؟

المحلول

You cannot do it with UISplitViewController.

There is better alternative MGSplitViewController By Matt Gemmel. Its API's are very similar to UISplitViewController, so that you can easily migrate to it. You can toggle Master and detail views vertically and horizontally. It has other very nice features also like draggable divider etc.

نصائح أخرى

As of iOS 11 this is possible with a property called UISplitViewControllerPrimaryEdge we can set the PrimaryEdge to either Leading or Trailing as like below.

self.splitViewController.primaryEdge = UISplitViewControllerPrimaryEdgeTrailing;
self.splitViewController.primaryEdge = UISplitViewControllerPrimaryEdgeLeading;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top