-
Notifications
You must be signed in to change notification settings - Fork 234
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.2 support #58
Conversation
Sources/View/NibOwnerLoadable.swift
Outdated
@@ -37,7 +37,7 @@ public extension NibOwnerLoadable where Self: UIView { | |||
Adds content loaded from the nib to the end of the receiver's list of subviews and adds constraints automatically. | |||
*/ | |||
func loadNibContent() { | |||
let layoutAttributes: [NSLayoutAttribute] = [.top, .leading, .bottom, .trailing] | |||
let layoutAttributes: [NSLayout.Attribute] = [.top, .leading, .bottom, .trailing] |
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.
Xcode 9.4.1: "Error: Use of undeclared type NSLayout
"
Sources/View/NibOwnerLoadable.swift
Outdated
|
||
/// Swift < 4.2 support | ||
#if !(swift(>=4.2)) | ||
private extension NSLayout { |
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.
Xcode 9.4.1: "Error: Use of undeclared type NSLayout
"
Sources/View/NibOwnerLoadable.swift
Outdated
@@ -37,7 +37,7 @@ public extension NibOwnerLoadable where Self: UIView { | |||
Adds content loaded from the nib to the end of the receiver's list of subviews and adds constraints automatically. | |||
*/ | |||
func loadNibContent() { | |||
let layoutAttributes: [NSLayoutAttribute] = [.top, .leading, .bottom, .trailing] | |||
let layoutAttributes: [NSLayout.Attribute] = [.top, .leading, .bottom, .trailing] | |||
for view in Self.nib.instantiate(withOwner: self, options: nil) { | |||
if let view = view as? UIView { |
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.
Could be the occasion to turn that into:
for case let view as UIView in Self.nib.instantiate(withOwner: self, options: nil) {
and avoid an extra level of indentation 😉
Yeah sorry, probably missed that yesterday, was doing a bunch of PRs to fix Swift 4.2 support. Seems CI is broken though? |
CI is actually disabled on forks for security reasons. Should work if you created a branch in the original repo (that is, if you had the rights) I think. I'm modifying the code rn, will push a commit there in a mo |
I think I checked, and I didn't have the rights? |
I'm not sure CircleCI was even started, like if the WebHook failed (I don't see even a pending build in the CircleCI console for this PR, only build 16 with was for the previous commit but none since I added one last commit…) |
CI still not triggering? Can you maybe trigger it through an API call? I remember (at some point) having some sort of browser extension to help with that, but can't remember if it was for travis or circle. |
I did a dummy force push, but to no avail it seems… |
Ok, found the missing config in circle. CI triggered. |
The codebase should be compatible with Swift 4.1.