I am using pushViewController method. i want to check some condition in initWithCoder method in second view controller, but as I use instantiateViewControllerWithIdentifier
in first controller initWithCoder
is called before setting property of second view controller. So how can I check that condition?
When we create instance of viewcontroller at that time initwithCoder method is called. so i used singleton class boolean variable set in prepareforsegue method and used in initWithCoder Method it works for me.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.