Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

README.md 1.8 KiB

3 år sedan
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # FDFullscreenPopGesture
  2. An UINavigationController's category to enable fullscreen pop gesture in an iOS7+ system style with AOP.
  3. # Overview
  4. ![snapshot](https://raw.githubusercontent.com/forkingdog/FDFullscreenPopGesture/master/Snapshots/snapshot0.gif)
  5. 这个扩展来自 @J_雨 同学的这个很天才的思路,他的文章地址:[http://www.jianshu.com/p/d39f7d22db6c](http://www.jianshu.com/p/d39f7d22db6c)
  6. # Usage
  7. **AOP**, just add 2 files and **no need** for any setups, all navigation controllers will be able to use fullscreen pop gesture automatically.
  8. To disable this pop gesture of a navigation controller:
  9. ``` objc
  10. navigationController.fd_fullscreenPopGestureRecognizer.enabled = NO;
  11. ```
  12. To disable this pop gesture of a view controller:
  13. ``` objc
  14. viewController.fd_interactivePopDisabled = YES;
  15. ```
  16. Require at least iOS **7.0**.
  17. # View Controller Based Navigation Bar Appearance
  18. It handles navigation bar transition properly when using fullscreen gesture to push or pop a view controller:
  19. - with bar -> without bar
  20. - without bar -> with bar
  21. - without bar -> without bar
  22. ![snapshot with bar states](https://raw.githubusercontent.com/forkingdog/FDFullscreenPopGesture/master/Snapshots/snapshot1.gif)
  23. This opmiziation is enabled by default, from now on you don't need to call **UINavigationController**'s `-setNavigationBarHidden:animated:` method, instead, use view controller's specific API to hide its bar:
  24. ``` objc
  25. - (void)viewDidLoad {
  26. [super viewDidLoad];
  27. self.fd_prefersNavigationBarHidden = NO;
  28. }
  29. ```
  30. And this property is **YES** by default.
  31. # Installation
  32. Use cocoapods
  33. ``` ruby
  34. pod 'FDFullscreenPopGesture', '1.1'
  35. ```
  36. # Release Notes
  37. **1.1** - View controller based navigation bar appearance and transition.
  38. **1.0** - Fullscreen pop gesture.
  39. # License
  40. MIT