I notice in some case, XCode is not able to recognize unwind function in some UIViewController
.
For instance, the following UIViewController
has the following unwind functions.
- unwindFromShop
- unwindFromPreference
But, when I try to use StoryBoard to build unwind segue, it cannot recognize such functions in that view controller.
My current only workaround, is the select other unwind segue in other view controller, then rename Action
accordingly.
There is no issue, to trigger run the unwind function, during simulator run.
I try to clean, build, restart XCode. Somehow, XCode still not able to recognize the unwind functions declared in that particular view controller.
I was wondering, is this bug in XCode? I am using Version 13.3.1 (13E500a)
CodePudding user response:
I was able to workaround the issue, by renaming ViewController
class name to MainViewController
.
After the renaming, the XCode seems to able to recognize the unwind functions again.