Custom Floor Selector
How to implement a custom floor selector
To get started, create a class that conforms to both MPCustomFloorSelector
and UIView
. Please bear in mind that the provided example is solely for illustrative purposes. It is essential to appropriately integrate and customize it to align with your specific requirements and design preferences.
Next step is to initialize and add the class to MPMapControl
.
TIP
When configuring the floor selector class MyFloorSelector
, it is necessary to align the x and y coordinates according to your specific requirements. Utilizing constraints to ensure compatibility across various devices is highly recommended.
Next step is to handle the floor index. In this example, the floor selector requires knowledge of the current floor index, which can be obtained by reading the value from the current building.
Assign the currentFloor
to the floorIndex
variable.
It is important that the class representing the custom floor selector you have developed must conform to both the UIView
and MPCustomFloorSelector
protocols.
Expected Result
Last updated