gpt4 book ai didi

swift - Xcode 将 MinuteCalendarUnit 更改为 NSCalendarUnitMInute。我如何更改我的声明?

转载 作者:行者123 更新时间:2023-11-28 10:24:27 25 4
gpt4 key购买 nike

<分区>

今天早上,我的程序编译出错。这是消息:

MinuteCalendarUnit was deprecated in iOS version 8.0 Use NSCalendarUnitMInute instead

我将如何重构此语句?

let comp = calendar.components((.HourCalendarUnit | .MinuteCalendarUnit) | .SecondCalendarUnit, fromDate: date)

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