mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Prevent API misuse at compile time (#2035)
Using Objective-C attributes, in this case `unavailable`, we can hide unsupported APIs at compile time instead of detecting and warn about it at runtime with a set of asserts.
This commit is contained in:
committed by
Adlai Holler
parent
01c8dc3dc2
commit
70574243f7
@@ -17,4 +17,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@end
|
||||
|
||||
@interface ASAbstractLayoutController (Unavailable)
|
||||
|
||||
- (NSSet *)indexPathsForScrolling:(ASScrollDirection)scrollDirection rangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType __unavailable;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
Reference in New Issue
Block a user