开发者

Implementing UIView on top of NSView for porting from iOS to Mac OSX

I'd like to port my app to Mac OSx. in that vein, I'd like to create a class called "UIView" as an extension of NSView .. is this doable? Other than the co开发者_StackOverflow中文版ordinate system, is there anything I need to be worried about?

I assume CALayer and CoreAnimation are mostly the same. Other classes are UIImage and UIImageView, UIButton, etc.

Has anyone attempted this yet?


I second MCannon’s advice: you preprocessor macros, or abstract your classes behind an opaque class object, but I strongly advise against creating a new UIView class inheriting from NSView on Mac.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜