fscalendar

How do I show 2 different color dots for a date using FSCalendar?

给你一囗甜甜゛ 提交于 2021-02-10 23:43:09
问题 Beginner programmer here. I am trying to show two different color dots if there is a negative AND a positive transaction for that date. Here is my code. It only shows one dot. func calendar(_ calendar: FSCalendar, numberOfEventsFor date: Date) -> Int { let incomeTransaction = realm.objects(Transaction.self).filter(positiveTransactionPredicate(date: date)) let expenseTransaction = realm.objects(Transaction.self).filter(negativeTransactionPredicate(date: date)) for _ in incomeTransaction {

How do I show 2 different color dots for a date using FSCalendar?

南笙酒味 提交于 2021-02-10 23:41:46
问题 Beginner programmer here. I am trying to show two different color dots if there is a negative AND a positive transaction for that date. Here is my code. It only shows one dot. func calendar(_ calendar: FSCalendar, numberOfEventsFor date: Date) -> Int { let incomeTransaction = realm.objects(Transaction.self).filter(positiveTransactionPredicate(date: date)) let expenseTransaction = realm.objects(Transaction.self).filter(negativeTransactionPredicate(date: date)) for _ in incomeTransaction {

How do I show 2 different color dots for a date using FSCalendar?

一个人想着一个人 提交于 2021-02-10 23:40:43
问题 Beginner programmer here. I am trying to show two different color dots if there is a negative AND a positive transaction for that date. Here is my code. It only shows one dot. func calendar(_ calendar: FSCalendar, numberOfEventsFor date: Date) -> Int { let incomeTransaction = realm.objects(Transaction.self).filter(positiveTransactionPredicate(date: date)) let expenseTransaction = realm.objects(Transaction.self).filter(negativeTransactionPredicate(date: date)) for _ in incomeTransaction {

How do I show 2 different color dots for a date using FSCalendar?

落花浮王杯 提交于 2021-02-10 23:40:23
问题 Beginner programmer here. I am trying to show two different color dots if there is a negative AND a positive transaction for that date. Here is my code. It only shows one dot. func calendar(_ calendar: FSCalendar, numberOfEventsFor date: Date) -> Int { let incomeTransaction = realm.objects(Transaction.self).filter(positiveTransactionPredicate(date: date)) let expenseTransaction = realm.objects(Transaction.self).filter(negativeTransactionPredicate(date: date)) for _ in incomeTransaction {

disabling past days in fscalendar

痴心易碎 提交于 2020-01-06 05:43:26
问题 I'm using fscalender and am disabling user's selected days like this: func getUserSelectedDates(_ arrWeekDay: [Int], calender calenderVW: FSCalendar?) -> NSMutableArray { let arrUnAvailibilityDates = NSMutableArray() let currentDate: Date? = calenderVW?.currentPage //get calender let gregorianCalendar = Calendar.init(identifier: .gregorian) // Start out by getting just the year, month and day components of the current date. var components: DateComponents? = nil if let aDate = currentDate {

Trying to Reload FSCalendar with JSon data but it crashes

我是研究僧i 提交于 2019-12-30 13:33:03
问题 this question is linked with the my previous account's question. How to make API call for this web service to fetch array of present and absent dates separately in swift? code import UIKit import FSCalendar class AttendenceViewController : UIViewController, FSCalendarDelegate, FSCalendarDataSource, FSCalendarDelegateAppearance { @IBOutlet weak var calendar: FSCalendar! var presentdays : Array = [String]() var absentdays : Array = [String]() fileprivate let gregorian: Calendar = Calendar

Trying to Reload FSCalendar with JSon data but it crashes

一笑奈何 提交于 2019-12-30 13:32:11
问题 this question is linked with the my previous account's question. How to make API call for this web service to fetch array of present and absent dates separately in swift? code import UIKit import FSCalendar class AttendenceViewController : UIViewController, FSCalendarDelegate, FSCalendarDataSource, FSCalendarDelegateAppearance { @IBOutlet weak var calendar: FSCalendar! var presentdays : Array = [String]() var absentdays : Array = [String]() fileprivate let gregorian: Calendar = Calendar

How to remove days in FSCalendar Swift library

若如初见. 提交于 2019-12-25 06:54:45
问题 i'm using FSCalendar and want to remove days (Sun, mon, Tue, Wed, Thu, Fri, and Sat) from calendar for now i only change the color to clear calendarView.appearance.weekdayTextColor = UIColor.clear 回答1: You can hide/remvove days from calendar using calendarWeekdayView . Hide calendarView.calendarWeekdayView.isHidden = true Remove calendarView.calendarWeekdayView.removeFromSuperview() 回答2: This library contains the property to handle this condition self.calendar.weekdayHeight = 0 and this will