簡體   English   中英

第二個視圖控制器未顯示

[英]Second view controller not showing

我有兩個視圖控制器,主要鏈接到導航控制器。 我通過將主控制器鏈接到Storybaord上的第二個控制器來創建segue。 我將標識符稱為“關聯”,並將其作為推送序列。 我以編程方式創建了帶有附屬於附件視圖的按鈕的表格視圖單元(這是有意的)。 該按鈕調用performSegueWithIdentifier,但未顯示第二個視圖控制器。 除了我那不熟練的技術語言(對不起,我剛上IOS一周了),我知道我在做什么錯嗎?

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyIdentifier"];
//...
[myButton addTarget:self action:@selector(buttonizeButtonTap:) forControlEvents:UIControlEventTouchUpInside];
cell.accessoryView = myButton;

return cell;
}

-(void)buttonizeButtonTap:(id)sender{
    [self performSegueWithIdentifier:@"Associate" sender:sender];
}

好的,意識到我做錯了。 我已經將空的performSegueWithIdentifier方法重寫。 在我走路之前跑步的危險。 感謝你的幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM