IOS7: Remove checks that @available can be used

This was used in the past to make sure the code can be compiled
with old compilers that do not support using @available. But we
already dropped support for those old compilers, and in many
places already used @available without checking first that it can
be used.
This commit is contained in:
Thierry Crozat 2023-04-02 20:00:16 +01:00 committed by Lars Sundström
parent 924d9e63e0
commit 788411b5fe
2 changed files with 0 additions and 8 deletions

View File

@ -56,11 +56,7 @@
// The code only compils with the iOS 9.0+ SDK, and only works on iOS 9.0
// or above.
#ifdef __IPHONE_9_0
#if __has_builtin(__builtin_available)
if ( @available(iOS 9,*) ) {
#else
if ( [self respondsToSelector:@selector(inputAssistantItem)] ) {
#endif
UITextInputAssistantItem* item = [self inputAssistantItem];
if (item) {
item.leadingBarButtonGroups = @[];

View File

@ -794,11 +794,7 @@ uint getSizeNextPOT(uint size) {
// So for now disable this code when compiled with an older SDK, which means it is only
// available when running on iOS 11+ if it has been compiled on iOS 11+
#ifdef __IPHONE_11_0
#if __has_builtin(__builtin_available)
if ( @available(iOS 11, tvOS 11, *) ) {
#else
if ( [[[UIApplication sharedApplication] keyWindow] respondsToSelector:@selector(safeAreaInsets)] ) {
#endif
CGRect screenSize = [[UIScreen mainScreen] bounds];
CGRect newFrame = screenSize;
#if TARGET_OS_IOS