UIViewController Title attribute in Storyboard

后端 未结 10 2125
南旧
南旧 2021-02-03 19:58

I am setting the title field of a UIViewController via Interface Builder/Storyboard: \"enter

10条回答
  •  北荒
    北荒 (楼主)
    2021-02-03 20:07

    Step 1

    If you're looking at a Xib in Xcode's Interface Builder, take a look in the "Document Outline" panel (second panel from the left). Expand the view controller you're working with until you find an icon labelled: Navigation Item.

    Document Outline panel showing Navigation Item

    Step 2

    If you then highlight the Navigation Item and open up the Utilities panel (the farthest on the right), and click the Attributes Inspector, you'll see where you can set the title of the view controller. This is the way to do it in Interface Builder, rather than doing it through code.

    Utilities panel showing how to set title of view controller

提交回复
热议问题