开发者

Which controller should I use?

开发者 https://www.devze.com 2023-01-27 15:41 出处:网络
I have knowledge of both UIViewController and UINavigationController. But I am very confused about which to use and when?

I have knowledge of both UIViewController and UINavigationController.

But I am very confused about which to use and when?

Can anyone clear up my confusion?

Also please let me know if there is any difference in开发者_运维技巧 memory and speed of BOTH..

(I only know about their storage procedure that one supports heap and the other stack)..


They have different use cases:

UINavigationController might be the "base" controller for handling different levels of views, i.e. you start with a table view, push a detail view, push another detail view etc.

UIViewController or UITableViewController would be classes for the concrete views you push onto the navigation controller.

0

精彩评论

暂无评论...
验证码 换一张
取 消