add support for UIKit state preservation/restoration