Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS Development - How to receive button event from a custom view controller class?
    primarykey
    data
    text
    <p>So I've got this "save" button in my main view controller that I would like to move into a different view controller (WriterViewController). After doing this, my custom view controller class isn't able to respond to any of the button events. Not sure what im doing wrong here but here some screenshots:</p> <p>Save button is first in my main view controller. I'll be moving it to the view controller to the right (WriterViewController).</p> <p><img src="https://i.stack.imgur.com/MWJeI.png" alt="Save button is currently in the main view controller."></p> <p>As you can see, after moving the button into the intended view controller, the view controller has a custom class set to "WriterViewController".</p> <p><img src="https://i.stack.imgur.com/RLe5x.png" alt="enter image description here"></p> <p>I then ctrl + click and drag the save button so that i can link up it's "Touch Up Inside" event to the "saveEntry" method.</p> <p><img src="https://i.stack.imgur.com/NwIpy.png" alt="enter image description here"></p> <p>A screenshot of my WriterViewController.h file.</p> <p><img src="https://i.stack.imgur.com/GXjaL.png" alt="enter image description here"></p> <p>And the implementation.</p> <p><img src="https://i.stack.imgur.com/pCKDk.png" alt="enter image description here"></p> <p>Doing the same exact step for the main view controller did work and i was able to log my message. However, it wouldn't work for the custom view controller.</p> <p>Any thoughts? </p> <p>Thanks for reading!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload