parent
9b141e0f2f
commit
8b87bbe250
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
# Updates
|
||||
|
||||
To get the iOS7 compatibility, You need to include [NSCalendarExtension](https://github.com/WenchaoD/NSCalendarExtension) into your project.
|
||||
[NSCalendarExtension](https://github.com/WenchaoD/NSCalendarExtension) is required to get iOS7 compatibility.
|
||||
|
||||
# [中文介绍](http://www.jianshu.com/notebooks/4276521/latest)
|
||||
[**QQ交流群: 323861692**](#qq_group)
|
||||
|
|
@ -128,6 +128,9 @@ calendar.delegate = self
|
|||
view.addSubview(calendar)
|
||||
self.calendar = calendar
|
||||
```
|
||||
|
||||
> **FSCalendar** is fully compatible for Swift3, see `SwiftExample` for more details.
|
||||
|
||||
<br/>
|
||||
|
||||
## <a id='adjusts_frame_dynamicly' /></a>Warning
|
||||
|
|
@ -157,6 +160,7 @@ self.calendar = calendar
|
|||
|
||||
# <a id="pre-knowledge"></a>Pre-knowledge
|
||||
## How to create NSDate object
|
||||
|
||||
* By **NSCalendar**.
|
||||
|
||||
```objc
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ class ViewController: UIViewController, FSCalendarDataSource, FSCalendarDelegate
|
|||
@IBOutlet weak var calendar: FSCalendar!
|
||||
@IBOutlet weak var calendarHeightConstraint: NSLayoutConstraint!
|
||||
|
||||
private var formatter: DateFormatter = {
|
||||
private let formatter: DateFormatter = {
|
||||
let formatter = DateFormatter()
|
||||
formatter.dateFormat = "yyyy/MM/dd"
|
||||
return formatter
|
||||
}()
|
||||
private var gregorian: NSCalendar! = NSCalendar(calendarIdentifier:NSCalendar.Identifier.gregorian)
|
||||
private let gregorian: NSCalendar! = NSCalendar(calendarIdentifier:NSCalendar.Identifier.gregorian)
|
||||
|
||||
let datesWithCat = ["2015/05/05","2015/06/05","2015/07/05","2015/08/05","2015/09/05","2015/10/05","2015/11/05","2015/12/05","2016/01/06",
|
||||
"2016/02/06","2016/03/06","2016/04/06","2016/05/06","2016/06/06","2016/07/06"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue