开发者

How push back view when click on row of table view?

开发者 https://www.devze.com 2023-04-01 12:47 出处:网络
I want to set an event that when we select any row then open a new view similarly when user click on row then user go back to first view. For example user have button in main viewwhen click on that bu

I want to set an event that when we select any row then open a new view similarly when user click on row then user go back to first view. For example user have button in main view when click on that button then open a table view. When user click on any row then navigation controller push开发者_开发问答 view to back to main view not in forward view. How implement this event in my project?


In table view delegate didSelectRowAtIndexPath use -

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{
    [self.navigationController popViewControllerAnimated:TRUE];
}
0

精彩评论

暂无评论...
验证码 换一张
取 消