-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift 4 #457
Conversation
Generated by 🚫 Danger |
I presume we will be putting out a swift 4.0 branch for now and not merge into master? (Until of course swift 4 is stable and not in beta)? |
As in today, Xcode 9 is GM so it is stable and not in beta anymore |
But this branch needs some work before we merge into master |
let copyArray = someArray | ||
copyArray.forEachEnumerated { XCTAssertTrue(someArray[$0.0] == $0.1) } | ||
// copyArray.forEachEnumerated { XCTAssertTrue(someArray[$0.0] == $0.1) } | ||
XCTFail() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets put TODOs here and everywhere else we have interjected a deliberate Fail.
let boldResult2 = NSAttributedString(string: testString2, attributes: [NSFontAttributeName: UIFont.boldSystemFont(ofSize: UIFont.systemFontSize)]) | ||
let underlineResult = NSAttributedString(string: testString, attributes: [NSUnderlineStyleAttributeName: NSUnderlineStyle.styleSingle.rawValue]) | ||
let underlineResult2 = NSAttributedString(string: testString2, attributes: [NSUnderlineStyleAttributeName: NSUnderlineStyle.styleSingle.rawValue]) | ||
let boldResult = NSAttributedString(string: testString, attributes: [NSAttributedStringKey.font: UIFont.boldSystemFont(ofSize: UIFont.systemFontSize)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a new lint thing? Or did you interject these spaces accidentally?
Sources/UIViewExtensions.swift
Outdated
self?.setScale(x: 1, y: 1) | ||
}) | ||
} | ||
// public func reversePop() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put a TODO here to fix this back.
@@ -609,7 +609,7 @@ extension UIView { | |||
|
|||
// MARK: Fade Extensions | |||
|
|||
private let UIViewDefaultFadeDuration: TimeInterval = 0.4 | |||
public let UIViewDefaultFadeDuration: TimeInterval = 0.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really a swift 4.0 thing?
Sources/StringExtensions.swift
Outdated
let size = CGSize(width: width, height: CGFloat(Double.greatestFiniteMagnitude)) | ||
return ceil((self as NSString).boundingRect(with: size, options: NSStringDrawingOptions.usesLineFragmentOrigin, attributes:attrib, context: nil).height) | ||
} | ||
// public func height(_ width: CGFloat, font: UIFont, lineBreakMode: NSLineBreakMode?) -> CGFloat { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put TODO here to uncomment it later on.
Sources/StringExtensions.swift
Outdated
return nil | ||
} | ||
// internal func rangeFromNSRange(_ nsRange: NSRange) -> Range<String.Index>? { | ||
// let from16 = utf16.startIndex + nsRange.location |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put TODO here and the next method that they will be uncommented later.
Sources/DictionaryExtensions.swift
Outdated
dictionary.forEach { (key, value) -> Void in | ||
dictionary.forEach { (arg) -> Void in | ||
|
||
let (key, value) = arg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary in swift 4 syntax? IMO the earlier version looked cleaner.
Sources/ArrayExtensions.swift
Outdated
@@ -220,7 +220,7 @@ extension Array where Element: Hashable { | |||
extension Collection where Indices.Iterator.Element == Index { | |||
|
|||
/// Returns the element at the specified index if it is within bounds, otherwise nil. | |||
public subscript (safe index: Index) -> Generator.Element? { | |||
public subscript (safe index: Index) -> Iterator.Element? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats the difference?
Alright, I made a PR based on @Steven-Cheung's PR |
* Fix MacOS target build error * Fix test * Update travis-ci xcode version * Fix warnings
Already done. |
WIP branch of Swift 4. Everybody is invited to help it out.
Checklist
Checklist
Related to #456