Browse Source

Fix up interface layout direction

Robert Payne 10 years ago
parent
commit
18851b7ecd
1 changed files with 17 additions and 0 deletions
  1. 17 0
      Source/Snap.swift

+ 17 - 0
Source/Snap.swift

@@ -20,3 +20,20 @@
 //  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 //  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 //  THE SOFTWARE.
+
+#if os(iOS)
+import UIKit
+typealias InterfaceLayoutDirection = UIUserInterfaceLayoutDirection
+#else
+import AppKit
+typealias InterfaceLayoutDirection = NSUserInterfaceLayoutDirection
+#endif
+
+/**
+ * Config that can be used to configure Snap
+ */
+public struct Config {
+    
+    public static var interfaceLayoutDirection = InterfaceLayoutDirection.LeftToRight
+    
+}