有遇见过这个问题的吗? 帮帮忙!
真的好奇怪呀
已经解决!
楼主,我tableview加载全局变量的网络数据失败,怎么解决?
但是back后再次点击慧成功显示。
-
(void)viewDidLoad
{
;AppDelegate *myDelegate = delegate];
//AppDelegate *myDelegate1 = delegate];//将获取的value值放到数组容器中
; //////////////
//;
//NSLog(@“name内容为–》%@”, myDelegate.teamname );
}
//返回每个section的行数
-
(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
//必须返回与数据容器一样的数量,否则会报数据越界错
AppDelegate *myDelegate = delegate];
//AppDelegate *myDelegate1 = delegate];
//return myDelegate.listarr.count;
return myDelegate.listarr1.count;//return 7;
}
//cell内容
-
(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{static NSString *CellIdentifier = @“Cell”;
UITableViewCell *cell = ;//将要显示的数据赋值到cell上
AppDelegate *myDelegate = delegate];
//AppDelegate *myDelegate1 = delegate];cell.textLabel.text = ; ////////
//cell.textLabel.text = ;
return cell;;
}