This is what i’ve tried so far, as suggested by various websites:
[encoder encodeValuesOfObjCTypes:@encode(BOOL), self.isInPhotoLibrary];
[encoder encodeValuesOfObjCTypes:"i", self.isInPhotoLibrary];
[encoder encodeValuesOfObjCTypes:(const char *)self.isInPhotoLibrary];
All of these 3 crash. Anybody know how to use this? self.isInPhotoLibrary is a BOOL.
The documentation for
-encodeValuesOfObjCTypes:states:You are passing in a value, not a pointer. Do this instead:
Or, since you’re encoding only one value: