将iOS(iPhone)应用程序移植到mac? [英] port an iOS (iPhone) app to mac?

查看:128
本文介绍了将iOS(iPhone)应用程序移植到mac?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种首选方式可以解决这个问题?

Is there a preferred way to go about this?

有问题的应用程序不是太大。 。 。我在几个月内编写的单人游戏。

The app in question is not too large . . . single-player game that I wrote over the course of a couple of months.

编辑:我应该补充一点,我没有mac开发经验。 。 。作为iOS开发人员自然而然的事情。

I should add that I have no experience with mac development . . . outside of what comes naturally with being an iOS developer.

编辑:游戏中大量使用的类:NSObject,UIView和UIViewController的子类。我对NSView了解不多,但我很确定所有UIView的东西都能在那个类中运行。还有一些使用UITableViewController。我也有游戏中心,但我现在可以把它留下来。没有多点触控。

Classes heavily used in the game: subclasses of NSObject, UIView, and UIViewController. I don't know much about NSView, but I'm pretty sure all the UIView stuff will work in that class. Also some use of UITableViewController. I do also have Game Center, but I can leave that part out for now. There is no multi-touch.

编辑:我的图形是QuartzCore和CoreGraphics框架中的所有内容。我有一个中等的视图层次结构。

My graphics is all stuff that is in the QuartzCore and CoreGraphics frameworks. I do have a moderate view hierarchy.

编辑:如果你正在做这样的端口,你可能也对内存管理

If you are doing such a port, you may also be interested in the issue of memory management

推荐答案


  1. 没有简单的方法。 就这么简单。令人沮丧的是,你只需要善于编程Mac。

  1. There's no easy way. It's that simple. Depressingly, you simply have to become good at programming the Mac.

我很确定所有UIView的东西都能在那个类中运行 - 不幸的是,没有。一切都是不同的,你必须努力工作。

"I'm pretty sure all the UIView stuff will work in that class" -- unfortunately, no. Everything is different that enough you have to work hard.

这不是一个有趣的演出。确保你真的,真的认为它在经济上是值得的。

It's not a fun gig. Make sure you really, really think it's worth it financially.

除了其他任何东西,如果你堆叠,请注意兄弟视图对OSX不起作用的问题你的iOS应用程序中有很多视图。基本上,如果您依赖于手机上的嵌套层次结构视图,则必须更改为在Mac上使用图层(而不是简单的视图)!

Apart from anything else, be aware of the "sibling views don't work on OSX" problem if you stack up a lot of views in your iOS app. Essentially, you will have to change to using layers (instead of simply views) on the Mac if you rely on nested hierarchies of views here and there on the phone!

单击这个链接:有没有正确的方法处理重叠的NSView兄弟姐妹?以获取有关该特定问题的详细信息!

Click this link: Is there a proper way to handle overlapping NSView siblings? for the gory details on that particular problem!

这篇关于将iOS(iPhone)应用程序移植到mac?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆