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

Jw #13

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open

Jw #13

wants to merge 9 commits into from

Conversation

wooooooong
Copy link

  • delete minimap datasource (because the data is not dynamic, just need to set the data when init the minimap view)

  • just need to init minimap view and pass the scroll view, image, downsize ratio for the size of minimap view compared to scroll view and selectively, the minimap image if the image for the minimap is different from the image of the scroll view.

scrollView.contentInsetAdjustmentBehavior = .never
scrollImageView = UIImageView(frame: CGRect(x: 0, y: 0,
width: scrollView.frame.width,
height: scrollView.frame.height))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scrollImageView = UIImageView(frame: CGRect(origin: .zero, size: scrollView.frame.size))

This style looks better for minimizing code.

}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is THMinimapViewcan still be used from storyboard with setUp(scrollView:downSizeRatio:image:minimapImage) ?
Call default setUp()function, or you should handle required property from another function.(not from init)
For example,

let minimapView = THMinimapView()
minimapView.setup(scrollView: scrollView, downSizeRatio: downSizeRatio, image: image, minimapImage: minimapImage)

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.

3 participants