Skip to content
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

如何实现present的vc里面点击push到新的全屏页面 #146

Open
heyehao2008 opened this issue Apr 8, 2024 · 5 comments
Open

如何实现present的vc里面点击push到新的全屏页面 #146

heyehao2008 opened this issue Apr 8, 2024 · 5 comments

Comments

@heyehao2008
Copy link

比如一个控制器A,带导航栏。present出来B,B使用了该库,半屏。现在点击B上的某个按钮,要想push到C,C需要全屏展示。并且B不dismiss,这种操作要如何实现?我看有些App的交互就是这样。比如百度贴吧的评论列表,列表是半屏,点击列表中某个用户头像,又全屏push到用户资料页面

@heyehao2008
Copy link
Author

我能想到的方法是,从B push到C,把C包一层导航栏,然后B present C。只是自定义专场动画,让present的样式变成push的样式

@HeathWang
Copy link
Owner

可以这么搞,你可以试试,这点确实框架没有实现好。
example里有个例子,类似这种,是将B包一层导航栏,然后push的时候将其全屏,你可以运行example看看

@mlch911
Copy link
Contributor

mlch911 commented Apr 9, 2024

我能想到的方法是,从B push到C,把C包一层导航栏,然后B present C。只是自定义专场动画,让present的样式变成push的样式

B 没有动画 present 一个全屏的透明的 navigationVC(rootVC 是一个透明的 vc),然后 navigationVC 再 push C

@mlch911
Copy link
Contributor

mlch911 commented Apr 9, 2024

或者更通用的方式,我这边的处理是会新开一个window,在新的window上做后续操作,但这个处理更复杂,需要管理好透明window的生命周期

@heyehao2008
Copy link
Author

嗯,去试试几种想到的方法,看看效果。这种交互还挺常见的。知乎的评论列表也是这样的交互。很多App非全屏的页面,点击跳转基本都是push出一个全屏的新页面。

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

No branches or pull requests

3 participants