Adds an ability to check current view controller's view state and also to subscribe to view state changes notifications. Also, adds several helpful properties to easily configure some complex behaviors in xibs and storyboards.
Clone the repo and then open
Please check official guide
github "APUtils/ViewState" ~> 1.0
ViewState is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'ViewState', '~> 1.0'
- Extends UIViewController with .viewState enum property. Possible cases:
- Every UIViewController starts to send notifications about its state change. Available notifications to observe:
.UIViewControllerViewDidDisappear. You could check
userInfonotification's dictionary for parameters if needed.
.hideKeyboardOnTouch@IBInspectable property to hide keyboard on touch outside.
.becomeFirstResponderOnViewDidAppear@IBInspectable property to become first responser on
.flashScrollIndicatorsOnViewDidAppear@IBInspectable property to flash scroll indicators on
See example and test projects for more details.
Any contribution is more than welcome! You can contribute through pull requests and issues on GitHub.
Anton Plebanovich, [email protected]
ViewState is available under the MIT license. See the LICENSE file for more info.