Explorar o código

xcode6.4 编译错误

NSFoundationVersionNumber_iOS_8_0 这个宏在xcode6.4下没定义
codwam %!s(int64=10) %!d(string=hai) anos
pai
achega
f4b2e2f3a1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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];