-
Notifications
You must be signed in to change notification settings - Fork 231
use pass-in animation flag when scrolling pager view #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # Xcode | ||
| # | ||
| # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | ||
|
|
||
| ## Finder generated | ||
| .DS_Store | ||
|
|
||
| ## Vim's swap files | ||
| *.swp | ||
|
|
||
| ## Build generated | ||
| build/ | ||
| DerivedData/ | ||
|
|
||
| ## Various settings | ||
| *.pbxuser | ||
| !default.pbxuser | ||
| *.mode1v3 | ||
| !default.mode1v3 | ||
| *.mode2v3 | ||
| !default.mode2v3 | ||
| *.perspectivev3 | ||
| !default.perspectivev3 | ||
| xcuserdata/ | ||
|
|
||
| ## Other | ||
| *.moved-aside | ||
| *.xcuserstate | ||
|
|
||
| ## Obj-C/Swift specific | ||
| *.hmap | ||
| *.ipa | ||
| *.dSYM.zip | ||
| *.dSYM | ||
|
|
||
| # CocoaPods | ||
| # | ||
| # We recommend against adding the Pods directory to your .gitignore. However | ||
| # you should judge for yourself, the pros and cons are mentioned at: | ||
| # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control | ||
| # | ||
| # Pods/ | ||
|
|
||
| # Carthage | ||
| # | ||
| # Add this line if you want to avoid checking in source code from Carthage dependencies. | ||
| # Carthage/Checkouts | ||
|
|
||
| Carthage/Build | ||
|
|
||
| # fastlane | ||
| # | ||
| # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the | ||
| # screenshots whenever they are needed. | ||
| # For more information about the recommended setup visit: | ||
| # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md | ||
|
|
||
| fastlane/report.xml | ||
| fastlane/screenshots | ||
|
|
||
| #Code Injection | ||
| # | ||
| # After new code Injection tools there's a generated folder /iOSInjectionProject | ||
| # https://github.com/johnno1962/injectionforxcode | ||
|
|
||
| iOSInjectionProject/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,6 +54,38 @@ - (void)viewDidLoad { | |
| [self.view addSubview:self.layout.scrollView]; | ||
| } | ||
|
|
||
| - (void)viewWillAppear:(BOOL)animated { | ||
| [super viewWillAppear:animated]; | ||
| [self.visibleControllers enumerateObjectsUsingBlock: | ||
| ^(UIViewController * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { | ||
| [obj beginAppearanceTransition:YES animated:animated]; | ||
| }]; | ||
| } | ||
|
|
||
| - (void)viewDidAppear:(BOOL)animated { | ||
| [super viewDidAppear:animated]; | ||
| [self.visibleControllers enumerateObjectsUsingBlock: | ||
| ^(UIViewController * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { | ||
| [obj endAppearanceTransition]; | ||
| }]; | ||
| } | ||
|
|
||
| - (void)viewWillDisappear:(BOOL)animated { | ||
| [super viewWillDisappear:animated]; | ||
| [self.visibleControllers enumerateObjectsUsingBlock: | ||
| ^(UIViewController * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { | ||
| [obj beginAppearanceTransition:NO animated:animated]; | ||
| }]; | ||
| } | ||
|
|
||
| - (void)viewDidDisappear:(BOOL)animated { | ||
| [super viewDidDisappear:animated]; | ||
| [self.visibleControllers enumerateObjectsUsingBlock: | ||
| ^(UIViewController * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { | ||
| [obj endAppearanceTransition]; | ||
| }]; | ||
| } | ||
|
|
||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 添加TYPagerController将自己的出现和隐藏和事件传递出去的代码;
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TestPushViewController 是CustomViewController上的push按钮弹出的控制器;
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 测试了吗
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 我自己在使用
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 嗯,这个没有考虑到 |
||
| - (void)viewWillLayoutSubviews | ||
| { | ||
| [super viewWillLayoutSubviews]; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // | ||
| // TestPushViewController.h | ||
| // TYPagerControllerDemo | ||
| // | ||
| // Created by JiangWang on 22/08/2017. | ||
| // Copyright © 2017 tany. All rights reserved. | ||
| // | ||
|
|
||
| #import <UIKit/UIKit.h> | ||
|
|
||
| @interface TestPushViewController : UIViewController | ||
|
|
||
| @end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| // | ||
| // TestPushViewController.m | ||
| // TYPagerControllerDemo | ||
| // | ||
| // Created by JiangWang on 22/08/2017. | ||
| // Copyright © 2017 tany. All rights reserved. | ||
| // | ||
|
|
||
| #import "TestPushViewController.h" | ||
|
|
||
| @interface TestPushViewController () | ||
|
|
||
| @end | ||
|
|
||
| @implementation TestPushViewController | ||
|
|
||
| - (void)viewDidLoad { | ||
| [super viewDidLoad]; | ||
| self.view.backgroundColor = [UIColor orangeColor]; | ||
| } | ||
|
|
||
| @end |

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在这里添加了一个点击之后push一个新的viewController的按钮