mapbox / ios-sdk-examples

Live example code for the Mapbox iOS SDK
https://www.mapbox.com/ios-sdk/examples/
Other
95 stars 35 forks source link

UISlider update events result in compute-intensive apis being called on main thread, causing laggy behavior and occasional crash. #375

Closed nishant-karajgikar closed 4 years ago

nishant-karajgikar commented 4 years ago

In the BuildingLightExample and RasterImageryExample (and their swift counterparts), a UISlider is used to allow the user to play with various effects. This slider however is currently configured to be continuous and as a result invokes it's selector (on main thread) on every update event.

Since the mapbox operations are compute-intensive this causes laggy behavior in simulators (and the occasional crash on Xcode).

captainbarbosa commented 4 years ago

👍 Good point, I agree thats a good change!