【问题标题】:tableViewCell segue does not work. because of trigger?uitableViewCell segue 不起作用。因为触发?
【发布时间】:2019-09-19 14:18:56
【问题描述】:

我需要在一个工作的 swift 项目中添加一个 tableViewCell 和一个 segue。我做到了,但它没有调用prepare 函数。 所以我将storyboard xml中现有的segue与我的新segue进行了比较,我确实发现了不同之处,我的segue有trigger属性。

我想我现在需要删除这个 segue 并添加一个新的。

那么,如何在没有trigger="accessoryAction" 属性的情况下创建一个转场?

现有的:

  <connections>
    <segue destination="x1H..." kind="show" identifier="segueToSettingA" id="e4m..."/>
  </connections>

我的新不工作:

  <connections>
    <segue destination="Zg7..." kind="show" identifier="segueToSettingB" trigger="accessoryAction" id="7eW..."/>
  </connections>

【问题讨论】:

    标签: ios swift xcode segue


    【解决方案1】:

    这是因为"accessoryAction" 触发器。根据thisaccessorybuttontappedforrowwithUITableViewCell segue 存在错误。

    你可以尝试改成trigger="selection"或者去掉触发器,但最好的解决办法是使用可视化界面并标记选项:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-29
      • 1970-01-01
      相关资源
      最近更新 更多