Unwind Segue with UITableViewCell in Xamarin.iOS

﹥>﹥吖頭↗ 提交于 2019-12-25 16:49:24

问题


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?


回答1:


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:




回答2:


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 :-/



来源:https://stackoverflow.com/questions/23450111/unwind-segue-with-uitableviewcell-in-xamarin-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!