Browse Source

xcode6.4 编译错误

NSFoundationVersionNumber_iOS_8_0 这个宏在xcode6.4下没定义
codwam 10 years ago
parent
commit
f4b2e2f3a1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      MJRefresh/Custom/Header/MJRefreshStateHeader.m

+ 1 - 1
MJRefresh/Custom/Header/MJRefreshStateHeader.m

@@ -55,7 +55,7 @@ - (void)setTitle:(NSString *)title forState:(MJRefreshState)state
 
 #pragma mark - 日历获取在9.x之后的系统使用currentCalendar会出异常。在8.0之后使用系统新API。
 - (NSCalendar *)currentCalendar {
-    if (NSFoundationVersionNumber >= NSFoundationVersionNumber_iOS_8_0) {
+    if ([NSCalendar instancesRespondToSelector:@selector(calendarWithIdentifier:)]) {
         return [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian];
     }
     return [NSCalendar currentCalendar];