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

Convert to new Swift syntax #1

Closed
emartinson opened this issue Dec 8, 2015 · 4 comments
Closed

Convert to new Swift syntax #1

emartinson opened this issue Dec 8, 2015 · 4 comments

Comments

@emartinson
Copy link

Hello, could you please convert the code to the latest Swift syntax? Can't fix some issues like
func setUpConstraints() in ADChromePullToRefreshActionView

    self.addConstraints(horizontalConstraints as [AnyObject])

gives: 'NSArray' is not implicitly convertible to '[AnyObject]'; did you mean to use 'as' to explicitly convert?

there is 'as' already. I can't get the root cause of the issue

@emartinson
Copy link
Author

Fixed this by replacing this with:
self.addConstraints(horizontalConstraints as! [NSLayoutConstraint])

but there are more issues with linker I can't resolve:

Undefined symbols for architecture armv7:
"ADChromePullToRefresh.ADChromePullToRefreshActionView.init (ADChromePullToRefresh.ADChromePullToRefreshActionView.Type)(coder : __ObjC.NSCoder) -> ADChromePullToRefresh.ADChromePullToRefreshActionView", referenced from:
ADChromePullToRefresh.ADChromePullToRefreshCenterActionView.init (ADChromePullToRefresh.ADChromePullToRefreshCenterActionView.Type)(coder : __ObjC.NSCoder) -> ADChromePullToRefresh.ADChromePullToRefreshCenterActionView in ADChromePullToRefreshCenterActionView.o
ADChromePullToRefresh.ADChromePullToRefreshLeftActionView.init (ADChromePullToRefresh.ADChromePullToRefreshLeftActionView.Type)(coder : __ObjC.NSCoder) -> ADChromePullToRefresh.ADChromePullToRefreshLeftActionView in ADChromePullToRefreshLeftActionView.o
ADChromePullToRefresh.ADChromePullToRefreshRightActionView.init (ADChromePullToRefresh.ADChromePullToRefreshRightActionView.Type)(coder : __ObjC.NSCoder) -> ADChromePullToRefresh.ADChromePullToRefreshRightActionView in ADChromePullToRefreshRIghtActionView.o
ld: symbol(s) not found for architecture armv7

@Antondomashnev
Copy link
Owner

Hi @J-Crichton

I will take a look on it soon. Please create an issue, it would be great, thanks.

@emartinson
Copy link
Author

After a lot of time parsing swift code I've managed to fix and compile it, you may find class at https://yadi.sk/d/BqI86HDOm5qvH

Thank you very much for such a beautiful component!

@Antondomashnev
Copy link
Owner

@J-Crichton if you fix the code, please create PR so i can review your changes and merge them then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants