2015.4.7
New project content, inside created Navigationcontroller and Tablecontroller. Navigationcontroller as the root controller of window, Tablecontroller is the root controller for Navigationcontroller.
There is also a controller that is Congactinfocontroller, which is the controller of the Tablecontroller next interface.
1.model part
(1) ContactInfo
Attribute two: Name and phone
Method: None
(2) Contactmanager
Properties: Count (number of contacts)
Method: Addcontract,delcontract,contractatindex
Private property (written in implementtation): contracts (used to store all contacts)
Private methods (written in implementtation): Description (Very important)
2.controller part
(2)
(3) Contactinfocontroller
Property: ContactInfo *contact
Private properties: Uitextfield *name,*phone
Implementation method: Loadview ()
Self.view initialized, and then Self.view Addsubview: (label or button)
SetContact the contact information in the parameter is displayed in the view, remember to add the [self view] method, because the Loadview () is called only when you call your own view
iOS WEEK2 Contact's implementation