Skip to content

sharedManager renamed in sharedInstance to add compatibility to swift#89

Open
violabg wants to merge 1 commit intomariohahn:masterfrom
violabg:master
Open

sharedManager renamed in sharedInstance to add compatibility to swift#89
violabg wants to merge 1 commit intomariohahn:masterfrom
violabg:master

Conversation

@violabg
Copy link

@violabg violabg commented Mar 31, 2015

if you use this library in a swift project, you can't access
MHGallerySharedManager.sharedManager().
The compiler complains because it can't see sharedManager.
I looked around and find a fix thanks to this article
http://justinmiller.io/posts/2015/01/28/swift-objc-initializers/
So if you rename sharedManager in sharedInstance you are able to access
the singleton instance like this:
MHGallerySharedManager.sharedInstance().webPointForThumb

if you use this library in a swift project, you can't access
MHGallerySharedManager.sharedManager().
The compiler complains because it can't see sharedManager.
I looked around and find a fix thanks to this article
http://justinmiller.io/posts/2015/01/28/swift-objc-initializers/
So if you rename sharedManager in sharedInstance you are able to access
the singleton instance like this:
MHGallerySharedManager.sharedInstance().webPointForThumb
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

Successfully merging this pull request may close these issues.

1 participant