Browse Source

Merge pull request #401 from codwam/master

xcode6.4 编译错误
M了个J 10 years ago
parent
commit
fcb63ce5eb
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];