Skip to content

Commit faab4f9

Browse files
aleksprogergithub-actions[bot]
authored andcommitted
Add setNeedsLayout call on selector update (#9634)
- At some cases indoor selector didn't show top/bottom arrows, as it didn't recalculate the size cc @mapbox/maps-ios GitOrigin-RevId: 7f15b249acea9484a44bc026dbca37b04daef1dc
1 parent 77f4ed5 commit faab4f9

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

Sources/MapboxMaps/Documentation.docc/API Catalogs/CoreMapsInternal.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Maps rendering SDK also known as GL-Native. These are for internal use only.
4040
- ``SourceRemovedCallback``
4141
- ``StyleDataLoadedCallback``
4242
- ``StyleImageMissingCallback``
43+
- ``StyleAttributionsChangedCallback``
4344
- ``MapIdleCallback``
4445
- ``MapLoadedCallback``
4546
- ``StyleImageRemoveUnusedCallback``

Sources/MapboxMaps/Documentation.docc/API Catalogs/Events.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ The simplified diagram of the events emitted by the map is displayed below.
1919
- ``SourceDataLoaded``
2020
- ``StyleImageMissing``
2121
- ``StyleImageRemoveUnused``
22+
- ``StyleAttributionsChanged``
2223
- ``RenderFrameStarted``
2324
- ``RenderFrameFinished``
2425
- ``ResourceRequest``

Sources/MapboxMaps/Ornaments/IndoorSelectorView.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ final class IndoorSelectorView: UIView {
1919
self?.updateVisibility()
2020
self?.invalidateIntrinsicContentSize()
2121
self?.collectionView.reloadData()
22+
self?.setNeedsLayout()
23+
self?.updateLayout()
2224
}
2325

2426
self.model.onFloorSelected = { [weak self] in
@@ -96,7 +98,9 @@ final class IndoorSelectorView: UIView {
9698
guard isHidden != model.isHidden else { return }
9799
isHidden = model.isHidden
98100
if !isHidden {
101+
invalidateIntrinsicContentSize()
99102
collectionView.reloadData()
103+
setNeedsLayout()
100104
updateLayout()
101105
}
102106
}

0 commit comments

Comments
 (0)