为什么在像Kiwi和Quick这样的测试框架中使用beforeEach?
beforeEach {
let storyboard = UIStoryboard(name: "Main",
bundle: NSBundle(forClass: self.dynamicType))
let navigationController = storyboard.instantiateInitialViewController() as UINavigationController
v
我和UINavigationController打交道已经有一段时间了,但是这个问题对我来说有点棘手,
我有一个带有三个视图控制器的UINavigationController。
A -> B -> C
当我来到viewDidLoad()中的C视图控制器时,我现在要将B从堆栈中移除--如果我点击C--它将进入A,所有东西都按预期工作,但是B从未被释放,但C被释放了。
移除码:
if self.navigationController != nil{
for viewController in (self.navigationController?.viewC