swift -> 不同target 之间 的跳转

 



 

 

 

方式一,推荐

其中 ViewController() 是另外一个target的View, 也需要如上图 对 "Target Membership" 进行设置。

 

self.present(ViewController(), animated: true, completion: nil)

 

 

            self.parent?.present(ViewController(), animated: true, completion: nil);
            //self.navigationController?.pushViewController(ViewController(), animated: true)

 

 

 

 

方式二 

 

 

然后 执行 通常的跳转 代码 

 

            let mainStoryBorad = UIStoryboard(name: "要跳转到的storyboard的文件名比如Main", bundle: nil);
            let vc : UIViewController = mainStoryBorad.instantiateViewController(withIdentifier: "要跳转的viewcontroller对应的view的storyboard ID") as UIViewController;
            
            //设置跳转动画效果
            
            vc.modalTransitionStyle = UIModalTransitionStyle.flipHorizontal;
            
            present(vc, animated: true, completion: nil);

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
接下来继续讲解devstack自动部署OpenStack之localrc文件及遇到的问题解决。 4. 配置网络 若你想使用ovs网络,可以在localrc中配置如下: ```bash # ovs bridge name Q_BRIDGE_NAME=br-ex # ovs physical interface name PHYSICAL_INTERFACE_NAME=eth0 # the IP address of the ovs bridge PUBLIC_NETWORK_GATEWAY=192.168.1.1 ``` 5. 配置Horizon 如果你想要使用Horizon,可以在localrc中进行配置: ```bash # enable horizon enable_service horizon # set horizon theme HORIZON_THEME=mytheme ``` 6. 配置Swift 如果你需要使用Swift,可以在localrc中进行配置: ```bash # enable swift enable_service swift # set swift hash SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5 ``` 7. 配置Cinder 若你需要使用Cinder,可以在localrc中进行配置: ```bash # enable cinder enable_service cinder c-api c-sch c-vol # set volume group name VOLUME_GROUP="stack-volumes" # set cinder backend driver CINDER_VOLUME_BACKEND=LVM # set cinder volume name CINDER_VOLUME_NAME=cinder-volumes ``` 8. 配置Glance 如果你需要使用Glance,可以在localrc中进行配置: ```bash # enable glance enable_service glance # set Glance backend driver GLANCE_BACKEND=file # set Glance image directory GLANCE_IMAGE_DIRECTORY='/opt/stack/data/glance/images/' ``` 以上是常见的localrc配置,当然你还可以根据自己的需求进行调整和配置。 遇到的问题及解决方法: 1. 如果出现了“No module named MySQLdb”错误,需要安装MySQL-python: ```bash sudo apt-get install python-mysqldb ``` 2. 如果出现了“No module named pbr”错误,需要安装pbr: ```bash sudo pip install pbr ``` 3. 如果出现了“Could not determine a suitable URL for the plugin”错误,需要在本地安装git: ```bash sudo apt-get install git ``` 4. 如果出现了“Failed to discover available identity versions”错误,需要检查是否正确配置了keystone的服务地址和端口号。 5. 如果出现了“ERROR:openstack.cli.command:”错误,需要在local.conf中添加如下内容: ```bash # keystone endpoint KEYSTONE_SERVICE_URI=http://127.0.0.1:5000/v2.0/ ``` 本文介绍了devstack自动部署OpenStack之localrc文件及遇到的问题解决。希望对你有所帮助。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值