最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】swift中在导航栏上切换不同的视图控制器

iOS crifan 1745浏览 0评论

ios navigation bar switch viewcontroller

然后实现导航栏中,可以通过点击,切换三个不同的视图控制器

而不是仅仅切换视图view

-》只是切换view视图,可以通过segementedcontrol去做

ios – Instead of push segue how to replace view controller (or remove from navigation stack)? – Stack Overflow

31 Days of iOS: Day 4–Working with Multiple View Controllers and Storyboards

ios navigation tab bar

Tab Bar Controller和Navigation Controller混合使用详细教程 – JohnZr的个人页面 – 开源中国社区

ios – How to implement tab bar controller with navigation controller in right way – Stack Overflow

ios tab bar on navigator

ios navigationcontroller lib

【总结】

后来没有找到合适的办法

目前只能去尝试:

通过NavigationViewController去pop掉旧的,再push新的vc

或者是当前vc中presentViewController或showViewController

然后同时指定

modalPresentationStyle = UIModalPresentationStyle.CurrentContext

且尽量把animated为false

多种组合,或许可以实现类似的效果

转载请注明:在路上 » 【已解决】swift中在导航栏上切换不同的视图控制器

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
83 queries in 0.165 seconds, using 22.08MB memory