What are the differences between Restoration ID and identifier to a UITableViewCell that set in storyboard

后端 未结 2 728
广开言路
广开言路 2021-02-11 14:46

When I drag a UITableViewCell to a tableView in storyboard, I find there are two ID to be set in the inspector. One is in the Identity Inspector(

2条回答
  •  青春惊慌失措
    2021-02-11 15:18

    A restoration identifier is a string that you need to assign to any view controller or view that you want preserved and restored. During state preservation any view controllers or views in the view hierarchy that have a restoration identifier will be saved to disk.

    The Identity in the Identity Inspector, are used to instantiate objects from Storyboard

提交回复
热议问题