Created
September 2, 2014 07:41
-
-
Save hartbit/e8784e49dd062e6d0035 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface MyClass : NSObject | |
@property (nonatomic) BOOL boolProperty; | |
@end | |
@implementation MyClass | |
@end | |
// ... | |
MyClass* obj = [MyClass new]; | |
// WORKS ON SIMULATOR, BUT CRASHES ON DEVICE | |
[obj setValue:@"1" forKey:@"boolProperty"]; | |
NSAssert(obj.boolProperty, @"Invalid value"); | |
[obj setValue:@"0" forKey:@"boolProperty"]; | |
NSAssert(!obj.boolProperty, @"Invalid value"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment