[英]FSCalendar (Swift 4) how to start the week on a particular date
I'm using FSCalendar and need the week view to always begin at today and then show a week's worth. 我正在使用FSCalendar,因此需要从今天开始的每周视图,然后显示一周的价值。
Anyone know how to do this? 有人知道怎么做吗?
Thanks. 谢谢。
You can change the first week day of the calendar. 您可以更改日历的第一个工作日。
override func viewDidLoad() {
self.calendar.firstWeekday = 3
}
set 1 for sunday, 2 for monday and so on... 将1设置为星期日,将2设置为星期一,依此类推...
more information at: http://cocoadocs.org/docsets/FSCalendar/2.7.9/Classes/FSCalendar.html#//api/name/firstWeekday 有关更多信息,请访问: http : //cocoadocs.org/docsets/FSCalendar/2.7.9/Classes/FSCalendar.html#//api/name/firstWeekday
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.