corin8823 / Popover

Popover is a balloon library like Facebook app. It is written in pure swift.
MIT License
2.11k stars 327 forks source link

Fix crash in default show() methods #63

Closed albinekcom closed 7 years ago

albinekcom commented 7 years ago

This is a quick workaround but in the future it should be coded in a safer way.

corin8823 commented 7 years ago

👍

jimmaye commented 7 years ago

This PR breaks the basic show() functionality if you have more than one view controller pushed in the current window - e.g It'll work on a root view controller, but not if a child view controller I pushed upon that. I would argue that .last should be used instead of .first (an also unwrapped gracefully instead of forcefully). I'll submit a PR fixing this.