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

wkx picture wkx · May 9, 2016 · Viewed 17.4k times · Source

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(Restoration ID) and the other is in Attributes Inspector(identity).

What's the difference between them?

Answer

saagarjha picture saagarjha · May 9, 2016

Restoration IDs are used for state restoration, i.e. making your view look like it did when you quit the app-often used for re-creating objects. Storyboard IDs, on the other hand, simply identify objects on the storyboard-these are often used for creating objects.