Post

Replies

Boosts

Views

Activity

using NSKeyedArchiver with UITextView
I am using NSKeyedArchiver to archive and retrieve a UITextView. This works in the I can retrieve most of UITextView. However I cannot save and retrieve info about the border which is stored in a CALayer.              let tvdata = try NSKeyedArchiver.archivedData(withRootObject: textview! as UITextView, requiringSecureCoding: false)             let tvtmp = try! (NSKeyedUnarchiver.unarchiveTopLevelObjectWithData((self.tvdata?.regularFileContents)!) as? UITextView)!             let myAtmp = UITextView.unsecureUnarchived(from: tvdata)             print("textview.layer.borderWidth = \(textview!.layer.borderWidth)")             print("myAtmp.layer.borderWidth = \(myAtmp!.layer.borderWidth)")               let tvWrapper:FileWrapper = FileWrapper.init(regularFileWithContents:tvdata as Data)             let tmptv = UITextView.unsecureUnarchived(from: (tvWrapper.regularFileContents!))             Both tvTmp and myAtmp contains all of the usual UITextView values. Neither has the value for borderWidth. The printed values are : textview.layer.borderWidth = 3.0 myAtmp.layer.borderWidth = 0.0 tmptv.layer.borderWidth = 0.0 How can I archive and unarchive the borderWidth value?
4
0
688
Oct ’22
swiftUI Unknown platform linking against CloudDocs framework 7
When I attempt to run on the simulator iPhone SE (14.5), I get the message over 1200 times while the app is starting. The target platform in Xcode is iOS 14.5. During startup, I am performing a metaDataQuery to load data from iCloud. Has anyone else seen this?
Replies
4
Boosts
2
Views
3.2k
Activity
Jul ’22
using NSKeyedArchiver with UITextView
I am using NSKeyedArchiver to archive and retrieve a UITextView. This works in the I can retrieve most of UITextView. However I cannot save and retrieve info about the border which is stored in a CALayer.              let tvdata = try NSKeyedArchiver.archivedData(withRootObject: textview! as UITextView, requiringSecureCoding: false)             let tvtmp = try! (NSKeyedUnarchiver.unarchiveTopLevelObjectWithData((self.tvdata?.regularFileContents)!) as? UITextView)!             let myAtmp = UITextView.unsecureUnarchived(from: tvdata)             print("textview.layer.borderWidth = \(textview!.layer.borderWidth)")             print("myAtmp.layer.borderWidth = \(myAtmp!.layer.borderWidth)")               let tvWrapper:FileWrapper = FileWrapper.init(regularFileWithContents:tvdata as Data)             let tmptv = UITextView.unsecureUnarchived(from: (tvWrapper.regularFileContents!))             Both tvTmp and myAtmp contains all of the usual UITextView values. Neither has the value for borderWidth. The printed values are : textview.layer.borderWidth = 3.0 myAtmp.layer.borderWidth = 0.0 tmptv.layer.borderWidth = 0.0 How can I archive and unarchive the borderWidth value?
Replies
4
Boosts
0
Views
688
Activity
Oct ’22