更新时间:2023-02-12 19:19:35
当您在指针上使用 ==
code> NSString * 它是比较内存地址,不比较字符串的值。
When you use an ==
on pointers like NSString *
it is comparing memory addresses, not comparing the value of strings.
下面将实际比较字符串值:
The following will actually compare the string values:
if([date isEqualToString:choosedDate])