Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed SKZoomingScrollView Initialization #427

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yakovmanshin
Copy link

  • When SKZoomingScrollView is initialized, the setup() method is called twice: once in init(frame:) and then once more in init(frame:browser:)
  • Double call of setup() results in UI elements (such as SKDetectingImageView) created twice
  • Even though SKZoomingScrollView’s properties (e.g. imageView) are reassigned on the second call of setup(), the UI elements remain in the view hierarchy and device’s memory
  • To fix this, init(frame:browser:) has been to changed to be a designated initializer, and init(frame:) has been removed

* When `SKZoomingScrollView` is initialized, the `setup()` method is called twice: once in `init(frame:)` and then once more in `init(frame:browser:)`
* Double call of `setup()` results in UI elements (such as `SKDetectingImageView`) created twice
* Even though `SKZoomingScrollView`’s properties (e.g. `imageView`) are reassigned on the second call of `setup()`, the UI elements remain in the view hierarchy and device’s memory
* To fix this, `init(frame:browser:)` has been to changed to be a designated initializer, and `init(frame:)` has been removed
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