Skip to content

Commit

Permalink
added the extension EdgeInsets for macOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
keshavvishwkarma committed Dec 10, 2017
1 parent c3d2101 commit e64a276
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Binary file modified KVConstraintKit.framework.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion KVConstraintKit.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion KVConstraintKit/KVConstraintKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@

public typealias View = UIView
public typealias LayoutPriority = UILayoutPriority
public typealias EdgeInsets = UIEdgeInsets
public typealias EdgeInsets = UIEdgeInsets

#else
import AppKit

Expand All @@ -40,6 +41,13 @@
#if !swift(>=3.0)
public typealias EdgeInsets = NSEdgeInsets
#endif

extension EdgeInsets {
public static var zero: EdgeInsets {
return EdgeInsets()
}
}

#endif

/// MARK: TO PREPARE VIEW FOR CONSTRAINTS
Expand Down

0 comments on commit e64a276

Please sign in to comment.