Skip to content

fix: add usage of older API for older iOS versions#1516

Merged
kkafar merged 6 commits into
mainfrom
@kkafar/add-api-level-checks
Jul 7, 2022
Merged

fix: add usage of older API for older iOS versions#1516
kkafar merged 6 commits into
mainfrom
@kkafar/add-api-level-checks

Conversation

@kkafar
Copy link
Copy Markdown
Member

@kkafar kkafar commented Jul 6, 2022

Description

gestureRecognizer:shouldReceiveEvent method is unfortunately available only since iOS 3.14, so I decided to replave it with calls to methods from older apis (9.0+).

Changes

  • Overrided methods from older api: gestureRecognizer:shouldReceivePress: && gestureRecognizer:shouldReceiveTouch:.
  • Removed override of gestureRecognizer:shouldReceiveEvent:

It seems likely to me, that overriding gestureRecognizer:shouldReceiveTouch: should be enough but basing on apple developer docs - I'm not sure, thus this PR is introducing some dead code (gestureRecognizer:shouldReceivePress: method).

Test code and steps to reproduce

Test1072 -- see that the behaviour restored in #1512 works also on older iPhones.

Checklist

gestureRecognizer:shouldReceiveEvent: method

However for iOS < 13.4 swiping wont work correctly I guess
@kkafar kkafar changed the title fix: add checks for iOS version around fix: add checks for iOS version Jul 6, 2022
@kkafar kkafar marked this pull request as ready for review July 6, 2022 15:45
@kkafar kkafar requested a review from WoLewicki July 6, 2022 15:46
@kkafar kkafar changed the title fix: add checks for iOS version fix: add usage of older API for older iOS versions Jul 7, 2022
kkafar added 2 commits July 7, 2022 12:07
This method is not necessary if we use both methods from the older API
@kkafar kkafar merged commit ab05218 into main Jul 7, 2022
@kkafar kkafar deleted the @kkafar/add-api-level-checks branch July 7, 2022 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant