简体   繁体   English

对于 swift iOS 应用程序开发人员,如何转到仅占屏幕一部分的视图?

[英]For swift iOS app dev, how do I segue to a view that takes up part of the screen only?

GroupMe is a good example. GroupMe 就是一个很好的例子。 I want to implement something similar to this..我想实现类似的东西..

when you press the top left icon it'll bring you to the view on the left hand side, and when you click the right hand side of that view (the chats) it will bring you back当您按下左上角的图标时,它会将您带到左侧的视图,当您单击该视图的右侧(聊天)时,它将带您返回

As the documentation says:正如文档所说:

Use segues to define the flow of your app's interface.使用 segue 定义应用程序界面的流程。 A segue defines a transition between two view controllers in your app's storyboard file. Segue 定义了应用程序故事板文件中两个视图控制器之间的转换。 The starting point of a segue is the button, table row, or gesture recognizer that initiates the segue.转场的起点是启动转场的按钮、表格行或手势识别器。 The end point of a segue is the view controller you want to display. Segue 的终点是您要显示的视图控制器。 A segue always presents a new view controller, but you can also use an unwind segue to dismiss a view controller. segue 总是呈现一个新的视图控制器,但您也可以使用 unwind segue 来关闭视图控制器。

As said by Apple© segues are for changing View Controllers only and cannot be used to move single views.正如 Apple© 所说,segues 仅用于更改视图控制器,不能用于移动单个视图。 I suggest using animations to achieve the effect you are searching, however segues are definitely not what you are looking for.我建议使用动画来实现您正在搜索的效果,但是 segue 绝对不是您想要的。 Maybe this question on stackoverflow.com may help you.也许stackoverflow.com 上的这个问题可以帮助你。

And please be sure to check for information by yourself first, I got this information in less than 5 minutes by searching on Google.com.并且请务必先自己检查信息,我在 Google.com 上搜索不到 5 分钟就得到了这些信息。

Regards -Jorge问候-豪尔赫

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM