聲明連個VC A、B
App啟動锋华,顯示頁面A
2022-09-30 18:47:06.876852+0800 test11[690:109238] A view will appear
2022-09-30 18:47:06.887673+0800 test11[690:109238] A view did appear
點擊A 按鈕 跳轉(zhuǎn)B頁面
2022-09-30 18:48:53.424909+0800 test11[695:109929] B view did Load
2022-09-30 18:48:53.425239+0800 test11[695:109929] A view will disappear
2022-09-30 18:48:53.425410+0800 test11[695:109929] B view will appear
2022-09-30 18:48:54.027319+0800 test11[695:109929] A view did disappear
2022-09-30 18:48:54.027908+0800 test11[695:109929] B view did appear
接下來的點擊返回按鈕 從B退出A頁面:
2022-09-30 18:50:38.779772+0800 test11[695:109929] B view will disappear
2022-09-30 18:50:38.780187+0800 test11[695:109929] A view will appear
2022-09-30 18:50:39.294824+0800 test11[695:109929] B view did disappear
2022-09-30 18:50:39.295331+0800 test11[695:109929] A view did appear
2022-09-30 18:50:39.295724+0800 test11[695:109929] B dealloc
如果從B右滑返回嗡官,滑動到一半松手,仍顯示B毯焕,會走哪些方法?
開始右滑B
2022-09-30 18:52:26.109155+0800 test11[695:109929] B view will disappear
2022-09-30 18:52:26.109546+0800 test11[695:109929] A view will appear
松手返回B
2022-09-30 18:52:34.168683+0800 test11[695:109929] A view will disappear
2022-09-30 18:52:34.169035+0800 test11[695:109929] A view did disappear
2022-09-30 18:52:34.169190+0800 test11[695:109929] B view will appear
2022-09-30 18:52:34.169294+0800 test11[695:109929] B view did appear
結(jié)合上一篇的NSTimer的釋放應該手動放到哪里磺樱?
是不是放到
- (void)viewDidDisappear:(BOOL)animated{
NSLog(@"view did disappear");
[self.timer invalidate];
}
更多合適