Skip to content
This repository has been archived by the owner on Mar 29, 2018. It is now read-only.

NSDate extension can't support iOS7 #112

Open
ShineWu opened this issue Apr 12, 2015 · 2 comments
Open

NSDate extension can't support iOS7 #112

ShineWu opened this issue Apr 12, 2015 · 2 comments

Comments

@ShineWu
Copy link

ShineWu commented Apr 12, 2015

No description provided.

@PGLongo
Copy link
Contributor

PGLongo commented Apr 12, 2015

This PR has been just merged and should fix the problem with iOS 7

@smaspe
Copy link

smaspe commented Oct 26, 2015

Nope. The issue (or another issue, possibly) is that

component.setValue(minutes, forComponent: .CalendarUnitMinute)

does not exist in iOS 7, it was added in iOS 8. cf https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSDateComponents_Class/index.html#//apple_ref/occ/instm/NSDateComponents/setValue:forComponent:

The solution is to access the properties directly:

component.minute = minutes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants