Is it possible to dismiss a Modal View Controller (e.g. Page Curl) just in Interface Builder?
My current approach always was to create a new ViewController subclass with an IBAction dismissModalViewController and I was wondering if I could save some space / time doing this step just in IB.
No you cannot, because the Interface builder is simply a layout file, which doesn't run any code.
However you can create a custom UIButton subclass if you like and set that button to always dismiss the modal view controller when it is clicked. So whenever you need to dismiss a modal view controller, you can add in your IB a UIButton that is set to be a class of your created subclass and it will do the work for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With