Swift如何判断上午还是下午
let dateformatter = DateFormatter()
dateformatter.dateFormat = "aaa"
if dateformatter.string(from: Date()) == dateformatter.amSymbol
{
view.backgroundColor = UIColor.white
}
else
{
view.backgroundColor = UIColor.black
}
Hunter药药

浙公网安备 33010602011771号