아이디 객체가 위의 경우 중 하나가 아닌 경우
The NSUserDefaults class provides convenience methods for accessing common types such as floats, doubles, integers, Booleans, and URLs. A default object must be a property list, that is, an instance of (or for collections a combination of instances of): NSData, NSString, NSNumber, NSDate, NSArray, or NSDictionary. If you want to store any other type of object, you should typically archive it to create an instance of NSData.
그래서, 당신은 그들 중 하나로 변환해야합니다 NSUserDefaults 클래스의 설명에서
및 this question is what exactly you're looking for.
의 인스턴스에 포장해야하는 다른 형태의 객체를 저장하려면 NSUserDefault에서 버튼 객체를 저장 하시겠습니까? – Dilip
정말 저장하고 싶은 점은 무엇입니까? – manujmv
가능한 [NSUserDefaults에서 사용자 지정 개체를 저장하는 방법] 복제본 (http://stackoverflow.com/questions/2315948/how-to-store-custom-objects-in-nsuserdefaults) – Hemang