我得到了这个错误:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing the same view controller instance more than once is not supported
如何检查一个控制器是否已经存在于堆栈中,而不是推送该控制器而是移动到该控制器?
下面是我基于选项卡选择推送控制器的一些代码:
func tabSelected(tab: String) {
switch tab{
case