A
A
artursk2016-07-27 11:40:42
Objective-C
artursk, 2016-07-27 11:40:42

How to save events to display in FSCalendar calendar?

There is not enough knowledge, please tell me who used FSCalendar, how to save an event on the current date and transfer it to FSCalendar so that by clicking on the date you can read that this particular event was performed on that date
For example:

@IBOutlet weak var label: UILabel!
var workout = 0  
//к примеру cохраняем cобытие по окончанию таймера повлекшее workout = 1
if workout == 1{
    // КАК СОХРАНИТЬ, то что workout получил новое значение(тк после каждого окончания workout необходимо добавлять в календарь новые событие) ДЛЯ ТЕКУЩЕЙ ДАТЫ?  
}

Next, the event must be displayed on the calendar
func calendar(calendar: FSCalendar, numberOfEventsForDate date: NSDate) -> Int {
    //КАК ОТОБРАЗИТЬ ПОЛУЧЕННЫЕ СОБЫТИЯ?
    return
}

And display in the label by clicking on this date in the calendar
func calendar(calendar: FSCalendar, didSelectDate date: NSDate) {
        NSLog("calendar did select date \(calendar.stringFromDate(date))")
        label.text = "TODAY WORKOUT = \(workout)"
    }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question