Reprinted: http://www.cxy.me/doc/5558.htm Framework IPhone
-
- CocoaFoundation (Mac OS XCommon)
- Uikit
Android
MVC IPhone
-
- Model
- View
- Parent class of uiview
- InterfaceTools designed by builer
- Save the design information to the XIB file (XML)
- Controller
- Uiviewcontroller
- Uinavigationcontroller
- Uiimagepickercontroller
- Uitabbarcontroller
- Uitableviewcontroller
Android
-
- Model
- View
- Android. View,Android.Widget
- LayoutXML
- Save the designed information to an XML file
- Controller
- Activity
- Listactivity
- Mapactivity
- Expandablelistactivity
- Tabactivity
View Installation Method
- Comparison between the preview method of Android and iPhone
Controller usage
Label setting text Columns
IPhone
@ interface hogeviewcontroller: uiviewcontroller {uilabel * label;} @ property (nonatomic, retain) iboutlet uilabel * label; @ end @ implementation @ synthesize label; /* interface builder -(void) loadview { } */ - (< SPAN class = "syntype"> void ) viewdidload {[ super viewdidload]; label. TEXT = @ "Hello world ! ";}< SPAN class =" synidentifier ">- ( void ) dealloc { // memory release
[Label release]; [SuperDealloc];}@ End
Android
PublicClassHogeactivityExtendsActivity {PrivateTextview label;ProtectedVoidOncreate (bundle savedinstancestate ){Super. Oncreate (savedinstancestate); setcontentview (R. layout. Main); label = (textview) findviewbyid (R. Id. Label); label. settext ("Hello world! ");}}
Event IPhone
-
- Target action
- Responder chain
Android
Event Installation
- Android and iPhone eventsLibrary
IPhone
-
- Loadview
- Viewdidload
- Viewwillappear
- Viewdidappear
- Viewwilldisappear
- Viewdiddisappear
Android
-
- Oncreate
- Onstart
- Onresume
- Onpause
- Onstop
- Ondestroy
Memory events IPhone
Android