Skip to content

Instantly share code, notes, and snippets.

@atomicbird
Created May 16, 2019 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atomicbird/8a26cee416f3d0a5e91174fce89efc8e to your computer and use it in GitHub Desktop.
Save atomicbird/8a26cee416f3d0a5e91174fce89efc8e to your computer and use it in GitHub Desktop.
Add a comment field in Xcode storyboards
@IBInspectable var comment: String {
set {}
get { return "" }
}
@atomicbird
Copy link
Author

atomicbird commented May 16, 2019

Maybe a little clearer...
Comments will be stored in the storyboard file but don't have any value at run time.

extension UIView {
    @IBInspectable var comment: String {
        set {}
        get { return "" }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment