a . Uipickerview
1. Common properties of Uipickerview
Data source ( used to tell Uipickerview how many columns there are rows )
@property (nonatomic,assign) ID<UIPickerViewDataSource> dataSource;
Agent ( used to tell Uipickerview what to show every 1 rows per 1 columns , monitor Uipickerview 's Choice )
@property (nonatomic,assign) ID<UIPickerViewDelegate> delegate;
// Do you want to display the selected indicator
@property (nonatomic) BOOL Showsselectionindicator;
// How many columns are there altogether
@property (nonatomic,readonly) Nsinteger numberofcomponents;
2. Common methods of Uipickerview
// re-refresh all columns
-(void) reloadallcomponents;
re-refresh column component
-(void) Reloadcomponent: (Nsinteger) component;
The row row of column component is actively selected
-(void) SelectRow: (Nsinteger) Row incomponent: (Nsinteger) component animated: (BOOL) animated;
get The currently selected line number in column component
-(Nsinteger) Selectedrowincomponent: (Nsinteger) component;
3. Data source Method (Uipickerviewdatasource)
// How many columns are there altogether
-(Nsinteger) Numberofcomponentsinpickerview: (Uipickerview *) Pickerview;
How many lines are there in column component?
-(Nsinteger) Pickerview: (Uipickerview *) Pickerview numberofrowsincomponent: (nsinteger) component;
4. Proxy method (uipickerviewdelegate)
What is the width of column component?
-(CGFloat) Pickerview: (Uipickerview *) Pickerview widthforcomponent: (nsinteger) component;
What is the row height of column component?
-(CGFloat) Pickerview: (Uipickerview *) Pickerview rowheightforcomponent: (nsinteger) component;
What text is displayed in column component row
-(NSString *) Pickerview: (Uipickerview *) Pickerview Titleforrow: (nsinteger) Row forcomponent: (Nsinteger) component;
Section component row row shows what view ( content )
-(UIView *) Pickerview: (Uipickerview *) Pickerview Viewforrow: (nsinteger) Row forcomponent: (Nsinteger) component Reusingview: (UIView *) view;
column component row of pickerview was selected
-(void) Pickerview: (Uipickerview *) Pickerview Didselectrow: (nsinteger) Row incomponent: (Nsinteger) Component
two . Uidatepicker
1. Common Properties
display mode for DatePicker
@property (nonatomic) Uidatepickermode Datepickermode;
// display the regional language
@property (nonatomic, retain) Nslocale *locale;
2. Monitor the selection of Uidatepicker
* because Uidatepicker inherits from Uicontrol, so through addTarget: ... Monitor
Three . The complete process of program initiation
1.Main function
2.Uiapplicationmain
* Create uiapplication objects
* Create a uiapplication delegate object
3.delegate object starts processing ( listening ) system events ( no Storyboard)
* When the program is started , the agent's application:didfinishlaunchingwithoptions is called: method
* Create UIWindow in application:didfinishlaunchingwithoptions:
* Create and set UIWindow Rootviewcontroller
* Display window
3. According to Info.plist, get the file name of the most important storyboard, load the main storyboard ( with Storyboard
* Create UIWindow
* Create and set UIWindow Rootviewcontroller
* Display window
Common Properties of Uipickerview