-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{return 1;}-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{return [_dataArray count];}-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{static NSString *CellIndentifier=@"Cell";UITableViewCell *cell=[tableView dequeueReusableCellStyleDefault reuseIdentifier:CellIdentifier];if(cell==nil){cell=[[UITableViewCell alloc]];}}
View Controllers are at the core of every application. They act as sort of the glue between your models and your views. View controllers are both responsible for fetching/initializing your models as well as loading up your views to display the information within them.
如果是空白文件appDelegate.m添加 ViewController *view = [[ViewController alloc] init]; [self.window addSubview:view.view];