iOS控制器裏面自己內部跳轉

 最近做項目項目,看到了個有趣的現象,先是到了選擇城市頁面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:@"地區列表爲空"];

    }

當前控制器還能自己跳轉到自己,而且很完美的複用頁面

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章