Skip to content
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

Merged
merged 9 commits into from
Jul 12, 2018
Merged

Swift 4.2 support #58

merged 9 commits into from
Jul 12, 2018

Conversation

djbe
Copy link
Collaborator

@djbe djbe commented Jul 9, 2018

The codebase should be compatible with Swift 4.1.

@@ -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]
Copy link
Owner

@AliSoftware AliSoftware Jul 11, 2018

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"


/// Swift < 4.2 support
#if !(swift(>=4.2))
private extension NSLayout {
Copy link
Owner

@AliSoftware AliSoftware Jul 11, 2018

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"

@@ -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 {
Copy link
Owner

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 😉

@djbe
Copy link
Collaborator Author

djbe commented Jul 11, 2018

Yeah sorry, probably missed that yesterday, was doing a bunch of PRs to fix Swift 4.2 support.

Seems CI is broken though?

@AliSoftware
Copy link
Owner

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

@djbe
Copy link
Collaborator Author

djbe commented Jul 11, 2018

I think I checked, and I didn't have the rights?
Note: I've already made the requested changes.

@AliSoftware
Copy link
Owner

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…)

@djbe
Copy link
Collaborator Author

djbe commented Jul 12, 2018

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.

@AliSoftware
Copy link
Owner

I did a dummy force push, but to no avail it seems…

@AliSoftware
Copy link
Owner

Ok, found the missing config in circle. CI triggered.

@AliSoftware AliSoftware merged commit 223c205 into AliSoftware:master Jul 12, 2018
AliSoftware added a commit that referenced this pull request Jul 12, 2018
@djbe djbe mentioned this pull request Sep 3, 2018
@djbe djbe mentioned this pull request Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants