NSDictionary+CL.m 544 B

123456789101112131415161718192021222324
  1. //
  2. // NSDictionary+CL.m
  3. // CLWeeklyCalendarView
  4. //
  5. // Created by Caesar on 10/12/2014.
  6. // Copyright (c) 2014 Caesar. All rights reserved.
  7. //
  8. #import "NSDictionary+CL.h"
  9. @implementation NSDictionary (CL)
  10. - (id)objectForKeyWithNil:(id)aKey {
  11. if(!self) return nil;
  12. id object = [self objectForKey:aKey];
  13. if (object == [NSNull null]) {
  14. return nil;
  15. }
  16. return object;
  17. }
  18. @end
  19. // 版权属于原作者
  20. // http://code4app.com (cn) http://code4app.net (en)
  21. // 发布代码于最专业的源码分享网站: Code4App.com