-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a mostly backwards compatible API change with the previous version and only updates Swift 3 syntax It does however, require removing the LYT prefix from device constants on Swift because CGFloats are no longer bridged
- Loading branch information
Showing
20 changed files
with
177 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// DeviceConstants.swift | ||
// LayoutTest | ||
// | ||
// Created by Peter Livesey on 9/21/16. | ||
// Copyright © 2016 LinkedIn. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
/** | ||
This file redefines all the constants in LYTDeviceConstants for use in Swift. | ||
This wasn't needed in previous version of Swift because this conversion was done automatically. | ||
*/ | ||
|
||
public let iPhone4Width = NSNumber(value: Double(LYTiPhone4Width)) | ||
public let iPhone4Height = NSNumber(value: Double(LYTiPhone4Height)) | ||
public let iPhone5Width = NSNumber(value: Double(LYTiPhone5Width)) | ||
public let iPhone5Height = NSNumber(value: Double(LYTiPhone5Height)) | ||
public let iPhone6Width = NSNumber(value: Double(LYTiPhone6Width)) | ||
public let iPhone6Height = NSNumber(value: Double(LYTiPhone6Height)) | ||
public let iPhone6PlusWidth = NSNumber(value: Double(LYTiPhone6PlusWidth)) | ||
public let iPhone6PlusHeight = NSNumber(value: Double(LYTiPhone6PlusHeight)) | ||
public let iPadWidth = NSNumber(value: Double(LYTiPadWidth)) | ||
public let iPadHeight = NSNumber(value: Double(LYTiPadHeight)) | ||
public let iPadProWidth = NSNumber(value: Double(LYTiPadProWidth)) | ||
public let iPadProHeight = NSNumber(value: Double(LYTiPadProHeight)) | ||
public let AppleWatch38Width = NSNumber(value: Double(LYTAppleWatch38Width)) | ||
public let AppleWatch38Height = NSNumber(value: Double(LYTAppleWatch38Height)) | ||
public let AppleWatch42Width = NSNumber(value: Double(LYTAppleWatch42Width)) | ||
public let AppleWatch42Height = NSNumber(value: Double(LYTAppleWatch42Height)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.