TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Dec 2015 |
SPMSupports SPM | ✗ |
Maintained by Tatsuya Tanaka.
A convenient event kit written by Swift 2.0.
Using TTEventKit in your project requires the following steps:
In your top-level project directory, enter this:
git submodule add https://github.com/tattn/TTEventKit.git
TTEventKit
folder, and drag TTEventKit.xcodeproj
into the project navigator of your project.TTEventKit.framework
to “Link Binary With Libraries”.TTEventKit.framework
.import TTEventKit
EventStore.requestAccess() { (granted, error) in
if granted {
println("got permission")
}
}
let events = EventStore.getEvents(Month(year: 2015, month: 1))
if events != nil {
for e in events {
println("Title \(e.title)")
println("startDate: \(e.startDate)")
println("endDate: \(e.endDate)")
}
}
let start = NSDate()
let end = NSDate(timeIntervalSinceNow: 60*60)
EventStore.addEvent("new event", notes: "This is a test", startDate: start, endDate: end)
EventStore.removeEvents(year: 2016, month: 1)
EventStore.removeEvents(year: 2016, month: 1, day: 1)
// remove events from 1/5/2016 to 1/19/2016
EventStore.removeEvents(year: 2016, month: 1, day: 5, length: 15)
// simple
EventUI.showEditView()
// preset
let event = EventStore.create()
event.title = "new event"
event.notes = "memo"
EventUI.showEditView(event)
// update
let month = Month(year: 2016, month: 10)
let event2 = EventStore.getEvents(month, day: 1)[0]
EventUI.showEditView(event2)
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
TTEventKit is released under the MIT license. See LICENSE for details.