Unhide buttons in VC1 from VC2 using delegate

后端 未结 2 1086
生来不讨喜
生来不讨喜 2021-01-26 15:34

I am trying to Unhide some buttons in a ViewControl using a button in a secondary VC.

On my researches I found out that I have to use a \"Delegation action\".

I

相关标签:
2条回答
  • 2021-01-26 16:08

    Your VC1 should extend UIViewController.

    @interface VC1 : UIViewController <CustomDelegate>
    

    Make your connections again in the interface builder after that.

    0 讨论(0)
  • 2021-01-26 16:22

    Hi i review your code & i'll changes some things. i'll share this one . please check it

    Replace @interface VC1 : UIViewController <CustomDelegate> instead of @interface VC1 : NSObject <CustomDelegate>
    

    And add a navigation controller in story board like below image enter image description here

    Now its running perfectly :)

    0 讨论(0)
提交回复
热议问题