简体   繁体   中英

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.

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...

more information at: http://cocoadocs.org/docsets/FSCalendar/2.7.9/Classes/FSCalendar.html#//api/name/firstWeekday

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM