-
Notifications
You must be signed in to change notification settings - Fork 190
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
greatly reduced performance during presentCalloutFromRect:... #61
Comments
Hm. What if you moved the existing callout by just modifying its |
In my case, I'm never setting or getting the callout's frame, as initial presentation is done via the same |
Ah, I see. Yeah, this will definitely not be optimal with the new background drawing. Maybe there's a more clever/lightweight way to render the masked background. |
I'm going to close this as I don't want to support the requisite feature in our project anymore. Just note that callouts can't be re-presented in this way, but that's probably a small minority of use cases, if at all. Thanks @nfarina! |
Related issue: mapbox/DEPRECATED-mapbox-ios-sdk#421
This might not necessarily be a primary concern of this library, but I wanted to flag it.
One thing we do over in my project is to move the callout with the map's pan and zoom. On pan, the callout's layer is just moved around; no big deal. But on zoom, we repeatedly call
-presentCalloutFromRect:inLayer:constrainedToLayer:animated:
when the callout is on a vector shape in order to adjust the callout position in a more dynamic way than for simple points.In the new iOS 7 version as of 58ce460, calling this has much higher overhead since it works its way down to
-[SMCalloutMaskedBackgroundView contentMask]
, which in turn calls-[CALayer renderInContext:]
.I'm not sure how much trouble this is, but I'm going to look into modifying my library to possibly not reposition this way.
The text was updated successfully, but these errors were encountered: