There has been a period of exposure to iOS, and during this time, a preliminary understanding of the online tutorials was conducted.
Throughout the process, encountered a number of problems, listed here, so that their own search:
1. Picker control
When there are two components, click the first one, and the second one changes
-(void) Pickerview: (Uipickerview *) Pickerview Didselectrow: (nsinteger) Row incomponent: (Nsinteger) Component {
.....
[Self.mypickerview Reloadcomponent:kdevicecategory];
[Self.mypickerview selectrow:0 incomponent:kdevicename Animated:yes];
}
The picker control should be updated before making the first selection; otherwise, the results before the update will have an impact on the updated results (in contrast to the online tutorial order, the problem is found during testing).
2. Nsdictionary type
Nsdictionary *dictionary = [nsdictionary dictionarywithobjectandkeys: "Value", "Object", "value", "Object", nil];
The order of the key values cannot be reversed, first the value, and then the key.
3. TableView Control
Method called when table view draws a row
-(UITableViewCell *) TableView: (UITableView *) TableView Cellforrowatindexpath: (Nsinteger *) Indexpath {
NSString *mytableviewcellidentifier = @ "Mytableviewcellidentifier";
UITableViewCell *cell = [tableView Dequeuereusablecellwithidentifier:mytableviewcellidentifier];
....
}
TableView is a reference to the table that originated the request, you can create a class that acts as a data source for multiple tables, and when you initialize a Tableviewcell row, you should use the change parameter
(online tutorial using [UITableView alloc], will be an error)
Problems with the iOS learning process