skywinder / ActionSheetPicker-3.0

Quickly reproduce the dropdown UIPickerView / ActionSheet functionality on iOS.
http://skywinder.github.io/ActionSheetPicker-3.0
BSD 3-Clause "New" or "Revised" License
3.4k stars 740 forks source link

iOS 13 SDK Conditional Compilation #453

Closed umerasif closed 4 years ago

umerasif commented 4 years ago

In the file AbstractActionSheetPicker.m there is a line of code to do conditional compilation

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0

If __IPHONE_13_0 is not defined (which is the case with suppose Xcode 10.3 which does not have iOS SDK 13), then this will be replaced with 0 and the condition will resolve to true which would cause compile time errors when compiled with iOS SDK less than 13. This should be replaced with the following condition,

#if defined(__IPHONE_13_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0

This will first check if the macro is there, if it is not defined then we would go to the else part which is what is intended.

skywinder commented 4 years ago

Thank you! I changed it!

skywinder commented 4 years ago

@umerasif added you here 7b8a2df

umerasif commented 4 years ago

Thanks and np :)