react-native-navigation的迁移库

Bool.m 355B

12345678910111213141516171819202122232425262728
  1. #import "Bool.h"
  2. @interface Bool()
  3. @property (nonatomic, retain) NSNumber* value;
  4. @end
  5. @implementation Bool
  6. - (BOOL)get {
  7. return [self.value boolValue];
  8. }
  9. - (NSNumber *)getValue {
  10. return self.value;
  11. }
  12. - (BOOL)getWithDefaultValue:(BOOL)defaultValue {
  13. if (self.value) {
  14. return [self.value boolValue];
  15. } else {
  16. return defaultValue;
  17. }
  18. }
  19. @end