-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Any chance of porting this to OSX? #43
Comments
Well I am not planning to use this on OS X anytime soon, but if you are willing to do it - that would be great! |
Of course you would need to write an OS X app and test that it's behaving there :-) |
I guess there's no interest there. I will close this in a day of two if nobody wants to help with this. (Help means porting using typealiases, possibly handle mouse event in addition to touches, and testing to that it actually works) |
Oh there is interest, trust me. I mean basically there is one option for OSX right now (core plot) and it's an old crotchety bastard. Although I'd LOVE to, I personally don't have the time to learn this entire framework's inner workings enough to do this on top of everything else I have going on at the moment. I was hoping someone that knew it's internals would be able to bang it out real fast. I mean it shouldn't be too much work. |
Okay then :) I personally don't have the time right now but it really shouldn't be too much work... May be this will be your contribution to the project, who know ;) |
I like the project and porting it to OSX will be done... Maybe I will do some work soon |
That would be fantastic @Fab1n ! I'm helping start up a company and even though I'd love to help port this, time has not been my friend lately. |
@crewshin same as you. God I wish I have 48 hours a day. |
+1 OS X support would be more than awesome. |
@Fab1n any news on this? |
@danielgindi sorry, not yet. I didn't need it really until now, but when I need it, I will convert it. |
danielgindib, would like to understand the effort. Could you point me to where the changes need to be made. thx. |
If it was just making type alias for bridging it would be easy but there is an extensive use of gesture recognizers which don't have an equivalent for OS X. There is also some use of CADisplayLink which doesn't exist either but from what I read can be done. It's not as simple as everyone here makes it seem. You can try it out and maybe help us since I don't usually make things for OS X. |
And the coordinate system is different on OS X and iOS I remember? |
IF the coordinate system is different, it could be solved by changing the
affine matrix of the view on init...
|
Can the gesture recognizers not be implemented in stages? |
There is no 1 to 1 mapping of iOS gesture recognizers to OS X gesture recognizers. Some don't exist at all so those would need to be created for OS X or disabled all together. When I tried this out last that is where I stopped. |
I have limited knowledge of the library but some of my colleagues use it quit extensively on an iOS app and I'm working on the OSX port of this app. I therefore have some time to invest if it is feasible to make it OSX compliant and I'm interested in your thoughts of how we might go about it.
|
Probably a couple days. Don't know if I kept my work on the OS X version. If you could look into the gesture stuff that would be great. The NS* to UI* conversion is really easy with typaliases so dont worry about that. |
Okay so I did a little research and this is what I came up with. UI* to NS* conversion
UIView
Gestures
Coordinates
Any thoughts? |
awesome work :) only a few hours? |
@liuxuan30 yes, the find/replace bit of UI to NS/UI was actually easy. The difficult bits were the UIImage specific features (this project came in handy to find how they could be implemented) and implementing CADisplayLink for OSX (there is no such thing so I simply made it into a 60fps timer - could perhaps also use CVDisplayLink in the future). |
I've also implemented gestures by the way, however they need some more work. Tapping (clicking) and dragging works, haven't tried the others. OSX does not provide an NSPinchGestureRecognizer so that one won't work for sure. |
Thanks for putting time into this guys! I'm sure free time is hard to come by for everyone in here. |
@pixelspark thank you so much for you efforts! |
I've done some improvements. There are still some limitations to the gesture recognizers:
|
I have implemented Funny thing - CVDisplayLink is meant specifically for OpenGL, which makes me want to go back and try again to move all the drawing to OpenGL. But that's a project for another time :-) |
Looks great, Daniel! Thanks so much for fixing up these last things. I have pulled your branch into an OS X application that draws some charts and gestures + animations seem to work smoothly 👍 |
@petester42 feel free to merge that in when you feel it is ready! |
I think we need some comments in the docs about this, explaining current limitations (touch gestures). |
Any chance of porting this to OSX?
The text was updated successfully, but these errors were encountered: