In order to implement the layout for regular-sized devices, the traitCollection property of the details view controller is used. As mentioned earlier, the traitCollection property contains information about the current environment your app is running in. All UIView instances, UIViewControllers, UIWindows, UIPresentationControllers, and UIScreens conform to the UITraitEnvironment protocol.
This protocol dictates that all objects that conform to UITraitEnvironment must have a traitCollection attribute. They must also have a traitCollectionDidChange(_:) method. This method is called whenever the traitCollection attribute changes. This could happen if a user rotates their device or when a multitasking window ...