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 - interoperability and possible migration #136

Open
ogezue opened this issue Oct 7, 2015 · 6 comments
Open

Swift - interoperability and possible migration #136

ogezue opened this issue Oct 7, 2015 · 6 comments

Comments

@ogezue
Copy link

ogezue commented Oct 7, 2015

Have you planned to migrate to swift?

@ealeksandrov
Copy link
Owner

No, I can't see any pros in migrating to Swift. But I have planned to add modern obj-c features like nullability and generics to ease up the bridging with Swift projects.

@ealeksandrov
Copy link
Owner

Anyone having problems using EAIntroView with Swift - refer to answer in #143

@ealeksandrov ealeksandrov changed the title Migration to Swift? Swift - interoperability and possible migration Dec 3, 2015
@ealeksandrov
Copy link
Owner

Since Swift 3 is out and pretty stable - next EAIntroView major version will be rewritten in Swift.

@ealeksandrov
Copy link
Owner

Obj-c lightweight generics added in f440f6b.

@wazowski78
Copy link

wazowski78 commented Mar 6, 2019

I have manage to use objective C code on a Swift project so I am attaching the code to help any other dev to solve this issue easier.

        var page2 = EAIntroPage.init()
        page2.bgColor = UIColor.white
        page2.title = "title for this page"
        page2.titleFont = UIFont.boldSystemFont(ofSize: 25)
        page2.titleColor = UIColor.black
        page2.titlePositionY = 240;
        page2.desc = "description for this page"
        page2.descFont = UIFont.systemFont(ofSize: 20)
        page2.descColor = UIColor.black
        page2.descPositionY = 240
        page2.titleIconView = UIImageView(image: UIImage(named: "page2"))
        page2.titleIconPositionY = 120
        
        var page3 = EAIntroPage.init()
        page3.bgColor = UIColor.white
        page3.title = "title for this page"
        page3.titleFont = UIFont.boldSystemFont(ofSize: 25)
        page3.titleColor = UIColor.black
        page3.titlePositionY = 240;
        page3.desc = "description for this page"
        page3.descFont = UIFont.systemFont(ofSize: 20)
        page3.descColor = UIColor.black
        page3.descPositionY = 240
        page3.titleIconView = UIImageView(image: UIImage(named: "page3"))
        page3.titleIconPositionY = 120
        
        var intro = EAIntroView(frame: self.navigationController?.view.bounds, andPages:[page2,page3])
        intro?.show(in: self.navigationController?.view, animateDuration: 0.0)

@Hashir524
Copy link

@wazowski78 Saved My Day

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

No branches or pull requests

4 participants