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 Version #33

Closed
smashkins opened this issue Feb 18, 2016 · 6 comments
Closed

Swift Version #33

smashkins opened this issue Feb 18, 2016 · 6 comments

Comments

@smashkins
Copy link

Hi Robby,

Thanks for this great resource!!
Do you think to develop a Swift 2+ version?

I don't understand the documentation about How can make for a viewable and tappable area. Can you explain it ?

@mayakraft
Copy link
Owner

Hi,

I haven't learned swift yet. I'd be happy to port this when I learn it!

-(BOOL) touchInRect:(CGRect)rect;
this will tell return true if a finger is touching inside of a defined rect - this rect is defined in pixels:

if your image is 1024 x 512 pixels, a rect of (0, 0, 10, 256) will be a tall column in the upper left corner, 10 pixels wide stretching halfway down the image.

it returns true when a touch is inside of that rect. if you want more complicated tapping and releasing, i wonder if you could use a TapGesture in conjunction with my touchInRect function..

@fboulegue
Copy link
Contributor

any progress on this :-)?

@mayakraft
Copy link
Owner

I've got some free time - considering a Swift re-write.

I have a question for cocoapods: can one cocoapod include both obj-c and swift versions? I've searched about 30+ pods, each one is either one language or the other, none contain both. Is anyone familiar with cocoapods and know best practices here?

@chrismerron
Copy link

My knowledge and experience so far is that once you use 'use_frameworks!' to include a swift pod then all pods update to their swift equivalent. It's been a real pain in my projects updating everything to swift but happy to be proved wrong and learn if it's possible!

@CristianCardosoA
Copy link

You can add both Swift and obj-c via cocoa pods. Just add on plist file > user header search paths > Pods/**

@mayakraft
Copy link
Owner

I feel like Obj-C is working great inside swift projects, including with cocoapods using use_frameworks! like what chris said. A Swift re-write isn't necessary.

Unless anything else comes up, probably no re-write will happen (I tried last year it's not as easy as I expected). Going to close for now.

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

5 participants