-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
[NEW] Add support for swift 4.2 #30
Conversation
b025e82
to
c61f22d
Compare
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.
Thanks @Sameesunkaria
Please check some comments.
typealias RowAnimation = UITableView.RowAnimation | ||
#else | ||
typealias RowAnimation = UITableViewRowAnimation | ||
#endif |
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.
I think this is the way to go, but is typealias RowAnimation = UITableView.RowAnimation
needed in the Swift 4.2 or over?
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.
Nope. Added just to create symmetry.
@@ -2,6 +2,13 @@ | |||
import UIKit | |||
|
|||
public extension UITableView { | |||
|
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.
[Nit] Please remove this empty line.
@@ -2,6 +2,12 @@ | |||
import UIKit | |||
|
|||
public extension UITableView { | |||
#if swift(>=4.2) | |||
// Do nothing. UITableView has a RowAnimation enum |
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.
I think this comment is not needed.
#if swift(>=4.2)
#else
typealias RowAnimation = UITableViewRowAnimation
#endif
After fixed, please squash your commits into one commit. (git rebase -i)
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.
Done.
56c2eff
to
561aae4
Compare
@Sameesunkaria |
Now that swift 4.2 has been finalized and will be officially released shortly, I believe it is imperative that DifferenceKit supports it. The UIKit extensions were the only place where a change was needed.
NOTE: The code will still compile with swift 4.1, as language versions checks are being used to selectively compile the code.
The example project has not been updated to support swift 4.2, and should only be done when Xcode 10 is officially released.