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

DGElasticPullToRefreshLoadingViewCircle not public #2

Closed
tapz opened this issue Oct 22, 2015 · 16 comments
Closed

DGElasticPullToRefreshLoadingViewCircle not public #2

tapz opened this issue Oct 22, 2015 · 16 comments

Comments

@tapz
Copy link

tapz commented Oct 22, 2015

DGElasticPullToRefreshLoadingViewCircle is not public and is not accessible when using DGE as a framework (CocoaPods).

Also, please consider renaming the classes to have shorter names. Swift has namespaces, so no need to obj-c style long names and prefixes.

@gontovnik
Copy link
Owner

Hm. Do you have any thoughts why LoadingViewCircle is not accessible when using as a Framework?

Ok, I will re-think naming.

@tapz
Copy link
Author

tapz commented Oct 22, 2015

That's how it is in Swift. Internal classes are internal to a framework. Just make the classes and it's base class public. Also all initializers and overriden methods.

@tapz
Copy link
Author

tapz commented Oct 22, 2015

The extension has to be public too.

@gontovnik
Copy link
Owner

Basically make all my classes, extension and etc:
public class..
public extension..
public struct..

Right?

@tapz
Copy link
Author

tapz commented Oct 22, 2015

Yes

@jyounus
Copy link

jyounus commented Oct 22, 2015

Was about to report the same issue with Cocoapods.

Thanks in advance for fixing this!

@gontovnik
Copy link
Owner

Will make all public tonight and will push it

@carsonxyz
Copy link

Any update on this? I would love to use it in a project.

@gontovnik
Copy link
Owner

Have a look at my latest commit on cocoapods branch: https://github.com/gontovnik/DGElasticPullToRefresh/tree/cocoapods

Is it enough for CocoaPods?

@tapz
Copy link
Author

tapz commented Oct 24, 2015

You need to make the default initializer public as well:

DGElasticPullToRefreshLoadingViewCircle:
65: init() {

@gontovnik
Copy link
Owner

What about extension methods such as:
func dg_addPullToRefreshWithActionHandler...?

@jyounus
Copy link

jyounus commented Oct 24, 2015

Might as well make it public. No harm in this case.

On 24 Oct 2015, at 20:43, Danil Gontovnik notifications@github.com wrote:

What about extension methods such as:
func dg_addPullToRefreshWithActionHandler...?


Reply to this email directly or view it on GitHub.

@gontovnik
Copy link
Owner

I guess now should be fine? :) If yes then I gonna merge it back to master and update cocoapods

@tapz
Copy link
Author

tapz commented Oct 25, 2015

Seems to work. Looks like the extension functions don't need to be public as long as the extension itself is public. But no harm in making them public.

Have to say that this is the most coolest looking pull to refresh control I have seen so far. Keep up the good work!

@tapz
Copy link
Author

tapz commented Oct 25, 2015

Looks like all files were not recompiled in my computer and there are still some problems. In the DGElasticPullToRefreshLoadingViewCircle class the init needs override keyword and setPullProgress, startAnimating and stopLoading need to be public as the overriden functions are public.

init(frame: .zero) does not compile. I think init() without frame should work as the base class already calls UIView's init with a zero frame.

@gontovnik
Copy link
Owner

Released version 1.0.2, check it out, now all should be public. Please let me know if something does not work for you.

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

4 participants