Hide gray box in UiSplitView when animating to PrimaryHidden from PrimaryOverlay in iPhone
问题 There are numerous answers here that describe how to programmatically animate the primary split view: let addButton = self.splitViewController!.displayModeButtonItem() UIApplication.sharedApplication().sendAction(addButton.action, to: addButton.target, from: nil, forEvent: nil) On an iPad this works wonderfully! But on an iPhone there is this annoying gray box that trails the primary view. By wrapping that action in a UIView.animate block, its possible to see it quite clearly: The box is