Uiviewcontroller The main page of the display adds a ScrollView
Uicollectionviewcontroller comes with CollectionView
Uitableviewcontroller a comes with TableView
Uitableviewcontroller B is present by the interface
Add Collectionview,tableview to ScrollView to show slide effects
Problem, when present (modal) to Uitableviewcontroller is selected from Uicollectionviewcontroller cell, an error appears as follows:
Warning:attempt to present A on B whose view isn't in the window hierarchy!
Look at the information and say it's a messy view.
Need to change as follows
When adding a view to the ScrollView of Uiviewcontroller, add two sub-class controllers to the controller, respectively, for these two view
Controller that adds a subclass to view
[Self addchildviewcontroller:_attention]; [Self addchildviewcontroller:_allcontroll];
After the operation, there is effect, but the output shows as follows,
Presenting view controllers on detached view controllers is discouraged <attentioncontroller:0x7ff9d40376c0>.
When you should return to the selected cell, add the parent controll
[Self.parentviewcontroller PRESENTVIEWCONTROLLER:LISTVC Animated:yes Completion:nil];
Warning:attempt to present A on B whose view isn't in the window hierarchy!