Post marked as solved
Post marked as solved with 2 replies, 353 views
I need to see a sample code in order for me to understand. I am learning about NSDocuments, having created the starting template from Xcode. My Document consists of an Integer and the storyboard has a field to display and a button to increment the value. I need to learn how to store and read my Document data, a single Integer. This is what Xcode gives me: var myData: Int = 0 //my Document's Data. override func data(ofType typeName: String) throws -> Data { throw NSError(domain: NSOSStatusErrorDomain, code: unimpErr, userInfo: nil) } override func read(from data: Data, ofType typeName: String) throws { throw NSError(domain: NSOSStatusErrorDomain, code: unimpErr, userInfo: nil) }ive tied a few guesses but am completely lost; help me please.