Faça um loop pelas propriedades ObjC para serializar um objeto
Woot.h #import <Foundation/Foundation.h>#import <objc/runtime.h>@interface Woot : NSObject <NSCoding>@property (strong, nonatomic) NSString *name;@property (strong, nonatomic) NSString *address;@property (strong, nonatomic) NSString *phone;- (id)initWithCoder:(NSCoder *)aDecoder;- (void)encodeWithCoder:(NSCoder *)aCoder;@end Woot.m #import “Woot.h”@implementation Woot- (id)initWithCoder:(NSCoder *)aDecoder{ …
Continuar lendo