对于应用程序,如果严格遵循 MVC 模型,则可以保留模型,但需要重写视图和控制器。对于游戏来说,这取决于它的级别有多低。如果您使用的框架在 Mac 上也可用,那么很多功能可能会自动移植,但您仍然需要重新考虑控件、屏幕尺寸等。无论哪种方式,这都不是小事。
It's a very broad question and, as such, is very difficult to answer.
Generally the answer would have to be no.
For an app, if you strictly followed the MVC model, you'd be able to keep the model but would need to rewrite both the view and the controller. For a game it depends on how low-level it is. If you used a framework that it also available on the Mac then a lot may port automatically but you'll still need to reconsider the controls, screen size, etc. Either way it's non-trivial.
已经有一段时间了,但看起来现在可以将一些 iOS 应用程序移植到 Mac 上。显然,它们看起来就像是在 iOS 模拟器下运行,没有假 iPhone 屏幕边框。
使这一切成为可能的框架是 UMEKit,它是 Mac 上基于 Cocoa 的 UIKit 的重新实现。
It's been a while but looks like its now possible to port some iOS app over to the Mac. Obviously they will look as if they are running under the iOS Simulator, without the faux iPhone screen bezel.
The framework that makes this possible is UMEKit, a re-implementation of UIKit on the Mac on top of Cocoa.
我真的很怀疑,iOS编程是面向视图的,只有一个窗口,而MacOs是面向窗口的。即使 API 确实很相似,iOS 框架也完全是一个新事物,是最近才规划的(参见 UITable)。
I really doubt, iOS programming is view oriented with only one windows, MacOs instead is windows-oriented. Even if the APIs are really similar, the iOS framework is totally a new thing, recently projected (cfr. UITable).
A lot of the basic UI elements that iOS apps rely on (such as table views and navigation stacks) are not present on the MacOS. So at the very least you will need to rethink and rewrite a lot of your UI, though a lot of the underlying application logic code can be reused.
发布评论
评论(4)
这是一个非常广泛的问题,因此很难回答。
一般来说,答案是否定的。
对于应用程序,如果严格遵循 MVC 模型,则可以保留模型,但需要重写视图和控制器。对于游戏来说,这取决于它的级别有多低。如果您使用的框架在 Mac 上也可用,那么很多功能可能会自动移植,但您仍然需要重新考虑控件、屏幕尺寸等。无论哪种方式,这都不是小事。
It's a very broad question and, as such, is very difficult to answer.
Generally the answer would have to be no.
For an app, if you strictly followed the MVC model, you'd be able to keep the model but would need to rewrite both the view and the controller. For a game it depends on how low-level it is. If you used a framework that it also available on the Mac then a lot may port automatically but you'll still need to reconsider the controls, screen size, etc. Either way it's non-trivial.
已经有一段时间了,但看起来现在可以将一些 iOS 应用程序移植到 Mac 上。显然,它们看起来就像是在 iOS 模拟器下运行,没有假 iPhone 屏幕边框。
使这一切成为可能的框架是 UMEKit,它是 Mac 上基于 Cocoa 的 UIKit 的重新实现。
It's been a while but looks like its now possible to port some iOS app over to the Mac. Obviously they will look as if they are running under the iOS Simulator, without the faux iPhone screen bezel.
The framework that makes this possible is UMEKit, a re-implementation of UIKit on the Mac on top of Cocoa.
我真的很怀疑,iOS编程是面向视图的,只有一个窗口,而MacOs是面向窗口的。即使 API 确实很相似,iOS 框架也完全是一个新事物,是最近才规划的(参见 UITable)。
I really doubt, iOS programming is view oriented with only one windows, MacOs instead is windows-oriented. Even if the APIs are really similar, the iOS framework is totally a new thing, recently projected (cfr. UITable).
iOS 应用程序所依赖的许多基本 UI 元素(例如表格视图和导航堆栈)在 MacOS 上并不存在。因此,尽管许多底层应用程序逻辑代码可以重用,但至少您需要重新思考和重写大量 UI。
A lot of the basic UI elements that iOS apps rely on (such as table views and navigation stacks) are not present on the MacOS. So at the very least you will need to rethink and rewrite a lot of your UI, though a lot of the underlying application logic code can be reused.