Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @interface School : NSObject
- @property NSInteger level;
- - (BOOL) isForKids;
- @end
- @implementation School
- - (BOOL) isForKids {
- return _level == 3;
- }
- @end
- School *mySchool = [[School alloc] init];
- //set level to 3
- mySchool.level = 3;
- // expected boolean true but get false, why?
- BOOL forKids = [mySchool isForKids];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement