Problems with the iOS learning process

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.