我有以下财产:
@property (nonatomic) CGColorRef *strokeColor;
在我的程序的某个时刻,我将它设置为 nil。然后稍后在我的程序中,我检查它是否为零:
CGColorRef strokeColor = (*graphicPath.strokeColor != nil) ? CGColorRetain(*graphicPath.strokeColor) : nil;
我在这条线上的访问权限不好。我也尝试过使用 NULL 并且仍然没有骰子。当其中存储了一些东西并且它不是 nil / NULL 时,它就可以工作。
我怎样才能让它工作?