[adapting iOS 13] copy UIView 'thoroughly'

viewOriginal = UIView what you want to copy thoroughly (e.g. from storyboard)

let viewArchived = try! NSKeyedArchiver.archivedData(withRootObject: viewOriginalrequiringSecureCoding: false)

return try! NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(viewArchived) as! UIView

Comments

Popular posts from this blog

[Phonics KR 1.0] section Letter