[英]When decorating ObjC code with nullability annotations, do you also have to do the definition, or just the declaration?
我們正在准備一堆或 ObjC 代碼供 Swift 使用,這當然需要可空性注釋。 現在我的理解是,那些可空性注釋只需要在聲明站點上,而不是在定義上。 這意味着對於聲明在 header 文件中並且定義在 am/mm 文件中的情況,您不需要將它們添加到后者。 例如... 富.h:- (nullable ...