The Bottom Sheet is defined as a style that rises from the bottom of the app at any location.
The Bottom Sheet allows the screen to change according to scrolling.
Conditions for the Bottom Sheet I implemented this time:
The implementation method involves adding a UIPanGestureRecognizer to the superview and receiving events based on the state of the UIPanGestureRecognizer to differentiate between when it ends and when it is changing.
At that point, I compare the coordinates of the UIPanGestureRecognizer’s view with the initially set heights to change the height of the Bottom Sheet.
When using the Naver Map SDK, markers can be used to display information about coordinates to the user. To display a marker on the Naver Map, you need to provide an NMFOverlayImage. This object can be created by providing a UIImage or the name of an image asset.
However, to display a marker that combines both an image and text, you need to create a custom view (UIView) and convert it to UIImage to show the custom marker.
Since the text needs to change dynamically, I retrieved the text size using intrinsicContentSize
, readjusted the frame, and updated it with layoutIfNeeded
to resolve the issue.
I found the blog post on iOS Naver Map CustomMarker to be very helpful.
addArrangedSubview
instead of addSubview
by mistake.ImageResource
type from Kingfisher in Xcode 15 or later, it will conflict with the newly added ImageResource
type in Xcode 15 due to the same name. Therefore, you should use a type alias to avoid this conflict. typealias KFImageResource = Kingfisher.ImageResource