Created
December 18, 2017 09:25
-
-
Save stoeckley/610d5c7916c373d0ef693ec97d993fe7 to your computer and use it in GitHub Desktop.
Swift debug printing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if !DEBUG | |
public func print(_ items: Any..., separator: String = " ", terminator: String = "\n") { | |
//does nothing if not in debug build | |
} | |
#else | |
public func print(_ items: Any..., separator: String = " ", terminator: String = "\n") { | |
debugPrint(items) | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment