最近做項目項目,看到了個有趣的現象,先是到了選擇城市頁面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:@"地區列表爲空"];
}
當前控制器還能自己跳轉到自己,而且很完美的複用頁面