基于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.