Category: Article

[iOS]How to save and load a custom object?

Here we go. How to write a custom object which can be archived to a text file? Usually, we use NSKeyedArchiver to serialize an object and write it to a file. Correspondingly, NSKeyedUnarchiver is used to get the object from the file. The NSKeyedArchiver’s interface is like this: + (BOOL)archiveRootObject:(id)rootObject toFile:(NSString *)path; NSKeyedArchiver is a

[Demo]OmniGridView

OmniGridView Code (GitHub) OmniGridView This is a half-finished grid view for iOS. Cause Apple’s UITableView only allows us to add and reuse vertical cells, we need to write our own scroll view when we want to have horizontal cells. HOW TO USE Drag the OmniGridView Folder to your project. Use the OmniGridView like any other