mac-cain13 / R.swift

Strong typed, autocompleted resources like images, fonts and segues in Swift projects
MIT License
9.49k stars 763 forks source link

`StoryboardViewControllerIdentifier.callAsFunction(creator:)` should return non-optional value #890

Closed hujunfeng closed 5 months ago

hujunfeng commented 6 months ago

This method calls UIStoryboard.instantiateViewController(identifier:creator:) internally, which returns a non-optional view controller. Therefore, it is unnecessary to return optional value in the StoryboardViewControllerIdentifier method.

See also: https://developer.apple.com/documentation/uikit/uistoryboard/3213989-instantiateviewcontroller

tomlokhorst commented 5 months ago

Thanks!