最近做项目项目,看到了个有趣的现象,先是到了选择城市页面YFCityIndexViewController,然后点击某一个城市会到城市下面的区域的页面,后来发现
if (areaArray.count > 0) {
YFCityIndexViewController *vc = [[YFCityIndexViewController alloc] init];
vc.title = @"选择地区";
vc.type = IndexType_Area;
vc.cityId = cityId;
vc.cityIndexBlock = self.cityIndexBlock;
vc.modelArray = areaArray;
[self.navigationController pushViewController:vc animated:YES];
}else{
[self showHud:@"地区列表为空"];
}
当前控制器还能自己跳转到自己,而且很完美的复用页面