What's the easiest way to print the value of a variable of type UIInterfaceOrientation?
问题 As I debug my app, I want to print out the value of a local variable orien of type UIInterfaceOrientation . I tried print("\(orien") but it printed: UIInterfaceOrientation ... which is obviously useless. I then tried dump(orien) , which produced another useless output: - __C.UIInterfaceOrientation In Xcode, I set a breakpoint and right-clicked the variable and chose Print Description of , which produced: Printing description of orien: (UIInterfaceOrientation) orien = <variable not available>