gpt4 book ai didi

swift3 - FSCalendar:获取当前 View 的开始和结束日期

转载 作者:行者123 更新时间:2023-12-04 03:11:05 25 4
gpt4 key购买 nike

如何获取当前日历的开始和结束日期?

从屏幕截图中,我需要获取 Sep 24 2017 和 Nov 4 2017..

谢谢![enter image description here ] 1

最佳答案

var dateArray = [Date]()
for cell:FSCalendarCell in calendar.visibleCells() {
if cell.isPlaceholder {
dateArray.append(calendar.date(for: cell)!)
}
}

calendar.select(dateArray.min())
calendar.select(dateArray.max())

关于swift3 - FSCalendar:获取当前 View 的开始和结束日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45283294/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com