In iOS 8 there is a problem or a feature. When MPVolumeView is shown, it's being animated, like expanding from 0 to it's width. How can I fix that behavior? There was no such problem on iOS 7.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
- How can I add media attachments to my push notific
I confirm that this problem still exists in iOS 8. The workaround provided by Anastasia in one of the comments above (with overriding volumeSliderRectForBounds) seems to work but only when route button is not present. When it is present the slider overlaps the route button and it can no longer be pressed.
I made a simple modification of her solution, maybe someone can use it as a workaround, until Apple fixes that or better solution is provided.
I don't like hardcoding the spacer value, but I could not find how to calculate it dynamically.
One possible way to remove this behavior is to subclass MPVolumeView and perform some additional work after
[super layoutSubviews]
.This removes all inserted animations. So be sure that is what you want, since this is quite the overkill. One could also just remove the
position
andbounds
animations (seeremoveAnimationForKey:
).