fastred / IBAnalyzer

Find common xib and storyboard-related problems without running your app or writing unit tests.
http://holko.pl
MIT License
951 stars 26 forks source link

Detection of unwind segue usage #22

Open zfoltin opened 7 years ago

zfoltin commented 7 years ago

An @IBAction func unwindToHere(segue: UIStoryboardSegue) { } function in a ViewController is detected as unused when it shouldn't be. The function is used from another ViewController wired up as an Exit segue (eg: to a button to close/dismiss the current VC and unwind the VC stack to a previous one).

fastred commented 7 years ago

Thanks for the report! I guess another case is needed in ParserDelegate. Will take a look at it.

zfoltin commented 7 years ago

Thanks @fastred for looking into it. This is how it looks roughly in the storyBoard:

<connections>
    <segue destination="Blah-La-lbah" kind="unwind" unwindAction="unwindToHereWithSegue:" id="another-bl-ahh"/>
</connections>

I guess it would be a "segue" case?