Yes, you can. View. You can mark it with __attribute__((unavailable)) , which will cause the compiler to throw an error if you use it. However, the property will still be available if your object is ported to its superclass type, since this is a compilation of only time.
@interface MyClass : UICollectionViewFlowLayout @property (nonatomic) CGFloat minimumLineSpacing __attribute__((unavailable)); @end
source share