问题描述
我想使下面的.merchant菜单选项链接到我为其非UI设计的另一个视图控制器。我觉得它与Subview和连接我的MerchantViewController有关。我不想添加按钮,而是要使用这些“案例”。非常感谢,第一篇文章。
此视频中提到了可能的childviewcontroller解决方案:https://youtu.be/vKh1b3ctCf4?t=556
func transitionToNew(_ menuType: MenuType) {
topView?.removeFromSuperview()
switch menuType {
case .profile:
let view = UIView()
view.backgroundColor = .yellow
view.frame = self.view.bounds
self.view.addSubview(view)
self.topView = view
case .camera:
let view = UIView()
view.backgroundColor = .blue
view.frame = self.view.bounds
self.view.addSubview(view)
self.topView = view
//I want .merchant to link to a MerchantViewController
case .merchant:
let view = UIView()
//view.backgroundColor = .blue
view.frame = self.view.bounds
self.view.addSubview(view)
self.topView = view
default:
break
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)