【问题标题】:How to pass Data from one view controller to another view controller without using seague and storyboard如何在不使用故事板中的 segue 的情况下将数据从一个视图控制器传递到另一个视图控制器
【发布时间】:2018-10-13 05:14:20
【问题描述】:

请不要使用情节提要。

当我单击弹出窗口中的单选按钮时。当我单击“确定”时,单选按钮的标题将是主视图控制器中的按钮标题。

【问题讨论】:

    标签: swift


    【解决方案1】:

    您可以从UIButton.isSelected 属性中获取标题。您可以在viewDidLoad 方法中设置标题,如

    YourButton.setTitle("Title", for : .normal)
    YourButton.setTitle("Selected Title", for : .selected)
    

    【讨论】:

      猜你喜欢
      • 2012-11-27
      • 2015-05-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多