基于 uitableviewcell 选择,我执行 segue。我在下面粘贴了我的准备 segue 代码。就目前而言,代码似乎运行良好。但是,当我移动线路时
currentSelectionPopOver = [(UIStoryboardPopoverSegue *)segue popoverController];
直接在 [destList setDelegate:self] 之后;声明,我设置我的 destList 属性的 if 语句似乎在加载视图时没有使用。想法?只是对行为感到好奇。
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if([segue.identifier isEqualToString:@"showSelectionList"]) {
//the destination view controller displays the data
SelectionListController *destList = segue.destinationViewController;
[destList setDelegate:self];
//Set the type of selection list to show.
if(tagThatRequestedSelectionList == TAG_OFFSET + STATE) {
DLog()
[destList setRequestType:STATES_LIST];
}//end if.
if(tagThatRequestedSelectionList == TAG_OFFSET + CITY) {
DLog();
[destList setRequestType:CITY_LIST];
}//end if.
//Setup a pointer to the popover controller so it can be dismissed.
currentSelectionPopOver = [(UIStoryboardPopoverSegue *)segue popoverController];
}
}//end prepare.