Skip to content

Conversation

@Alex1989Wang
Copy link

使用传入动画参数决定是否动画

pushBtn.frame = CGRectMake(0, 0, 100, 40);
pushBtn.center = CGPointMake(self.view.center.x, self.view.center.y + 160);
[self.view addSubview:pushBtn];
_pushBtn = pushBtn;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在这里添加了一个点击之后push一个新的viewController的按钮

[obj endAppearanceTransition];
}];
}

Copy link
Author

@Alex1989Wang Alex1989Wang Aug 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

添加TYPagerController将自己的出现和隐藏和事件传递出去的代码;
不然在TYPagerController上的child view controller在由于去掉导航栏栈中的其他控制器或者去掉presented view controller而导致的出现都不会有事件;

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestPushViewController 是CustomViewController上的push按钮弹出的控制器;
在不加和加入以上代码的情况下:
断点TestPushViewController的viewWillAppear和viewWillDisappear事件就能够看到区别;

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

测试了吗

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我自己在使用

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
第一次进入是会有警告,因为viewWillAppear时visibleControllers还不存在没有调用beginAppearanceTransition , viewDidAppear时visibleControllers存在调了endAppearanceTransition 所以有问题

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯,这个没有考虑到

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants