when things like
[self.window addsubview:switchviewcontroller.view];
are setting switchviewcontroller rootviewcontroller?
actually no. rootviewcontroller main controller. callbacks such didreceivememorywarning sent rootviewcontroller only. , must decide whom addressed.
a window contain amount of views. of them have uiviewcontrollers, don't. [self.window addsubview:switchviewcontroller.view]; add view window, doesn't know controller. controllers should manipulated rootviewcontroller. way set switchviewcontroller rootviewcontroller invoke self.rootviewcontroller = switchviewcontroller; in appdelegate file.
Comments
Post a Comment