Skip to content

Commit

Permalink
OSX stuff to swift 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Amaral committed Sep 19, 2016
1 parent 6d90f97 commit 2549e06
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Neon.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@
};
03EDD3961BBF8A4F0006C4A9 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0800;
};
27D253651BAF71AB00FA4FED = {
CreatedOnToolsVersion = 7.0;
Expand Down Expand Up @@ -573,6 +574,7 @@
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand Down Expand Up @@ -600,6 +602,7 @@
PRODUCT_NAME = Neon;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand Down
6 changes: 3 additions & 3 deletions Source/NeonAlignable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public extension Alignable {
/// match the specified `Align`. For example, if you specify `.ToTheRightMatchingTop` and provide an offset value of `5`, the
/// view's y origin will be lower than the sibling view's y origin by 5 points.
///
public func align(align: Align, relativeTo sibling: Frameable, padding: CGFloat, width: CGFloat, height: CGFloat, offset: CGFloat = 0) {
public func align(_ align: Align, relativeTo sibling: Frameable, padding: CGFloat, width: CGFloat, height: CGFloat, offset: CGFloat = 0) {
var xOrigin : CGFloat = 0.0
var yOrigin : CGFloat = 0.0

Expand Down Expand Up @@ -97,11 +97,11 @@ public extension Alignable {

if height == AutoHeight {
self.setDimensionAutomatically()
self.align(align: align, relativeTo: sibling, padding: padding, width: width, height: self.height, offset: offset)
self.align(align, relativeTo: sibling, padding: padding, width: width, height: self.height, offset: offset)
}
if width == AutoWidth {
self.setDimensionAutomatically()
self.align(align: align, relativeTo: sibling, padding: padding, width: self.width, height: height, offset: offset)
self.align(align, relativeTo: sibling, padding: padding, width: self.width, height: height, offset: offset)
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/NeonExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extension View : Frameable, Anchorable, Alignable, Groupable {
self.sizeToFit()
#else
self.autoresizesSubviews = true
self.autoresizingMask = [.ViewWidthSizable, .ViewHeightSizable]
self.autoresizingMask = [.viewWidthSizable, .viewHeightSizable]
#endif
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/NeonGroupable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public extension Groupable {
///
/// - height: The height of each subview.
///
public func groupInCenter(_ group: Group, views: [Frameable], padding: CGFloat, width: CGFloat, height: CGFloat) {
public func groupInCenter(group: Group, views: [Frameable], padding: CGFloat, width: CGFloat, height: CGFloat) {
if views.count == 0 {
print("[NEON] Warning: No subviews provided to groupInCenter().")
return
Expand Down

0 comments on commit 2549e06

Please sign in to comment.