StuckOverFlow
StuckOverFlow

Reputation: 891

Xcode Storyboard what is Document section for?

What is the Document section when selecting the Identity inspector in any view.

Specially what are these squares with different colors for?

enter image description here

Upvotes: 2

Views: 327

Answers (1)

ilovecomputer
ilovecomputer

Reputation: 4708

The whole Identity section of the identity inspector exists to make things more convenient for you in Xcode.

The Label field identifies the UI element in Xcode.Suppose you have three text fields in your window. Giving each text field a different label makes it easier to identify each text field.

Here is an example, create two UIViews in Storyboard, and use Label to identify each(Clarify: You can't refer to UI element by its label, Label is just for convenience):

enter image description here

The color label looks quite similar to color labels in operating system, but I haven't figure out how to use it in Xcode yet.

The note section give an attributed string with a key of userComments to the storyboard file. For the usage of note section, this post may helphow-to-add-copyright-information-to-a-nib-file

Upvotes: 2

Related Questions