简体   繁体   中英

Unwind Segue with UITableViewCell in Xamarin.iOS

Can someone tell me definitively if there is a limitation with using Unwind Segues with UITableViewCell or if not how to achieve this?

I can successfully implement an unwind segue from my second view controller to my first - triggered using a simple UIButton .

However, when I try to use a UITableViewCell to create the unwind segue (drag from the TableViewCell to the green Exit icon then I do not get an option for Action Segue . Instead I get options for "Selection Segue" and "Accessory Action" .

How can I trigger the unwind segue on selection of a UITableViewCell ?

Selection segue will fire when you select the cell. Accessory action will fire when you tap the cell accessory. unwind: underneath the Selection Segue is the one you want to choose here:

在此处输入图片说明

Ok. I'm a little embarrassed at my error here. I hadn't created an outlet for my UITableView and was instead using a tableview that I had created and added through code in my ViewController. Therefore the "Scene Exit" that I hooked up to the UITableViewCell on my storyboard was never being called (because the UITabelViewCell that it was hooked up to was not the one that was visible when the app ran)

I simply created an outlet to the table view and used that and all was fine. I'll put it down to my newbie status :-/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM