File -> New -> Project -> Single View Application
Open storyboard -> Drag "Table View" to View Controller
Press crtl and drag line from "Table View" to ViewController.h
NSArray: static array
Cannot be changed after the array has been initialized.
NSMutableArray: dynmaic array
Can be modified after they have been created.
Here we used NSMutableArray.
Added two protocols:
UIViewController should be added UITableViewDelegate/UITableViewDataSource protocols.
We just declared the arrDataSource by using "@property" in ViewController.h and no longer need to "@synthesize" in ViewController.m file. @synthesize arrDataSource = _arrDataSource;
The compiler will auto generate getter/setter, now we can use _arrDataSource.