How to build WebKit on iPhone?
I have built WebKit
on Mac, but I want to build it on iPhone.
Should I convert Cocoa framework to Cocoa开发者_运维问答Touch framework?
Like NSView
to UIView
?
or any other functions?
There are certainly going to be things not directly translatable from Cocoa to UIKit. Yes the core of Webkit is mostly platform-independent C++, however, all the nice views will require a lot more work than just class replacement. More than just internal mechanics, you also have to deal with completely redesigning the views for the iOS interface--handling touches for scrolling and zooming, getting input forms and text selection to work with the system-wide text protocols, etc.
Unless you have to do something ridiculously complicated, just stick with UIWebView.
精彩评论