mpvolumeview

iOS 9: How to change volume programmatically without showing system sound bar popup?

99封情书 提交于 2020-03-07 05:40:33
问题 I have to change the volume on iPad and using this code: [[MPMusicPlayerController applicationMusicPlayer] setVolume:0]; But this changing volume and showing system volume bar on iPad. How to change the sound without showing the volume bar? I know, setVolume: is deprecated, and everybody says to use MPVolumeView . If this is the only way to solve my problem, then how to change the volume using MPVolumeView ? I don't see any method in MPVolumeView that changes the sound. Should I use some

iPhone how hide volume overlay when press volume key

拜拜、爱过 提交于 2020-01-22 16:28:13
问题 I have do lots to solve it,like add MPVolumeView,someone says that system volume HUD will hide if you add a instance of MPVolumeView in current,but that not work i add obsever to observe the volume's change,and take picture but now i lost in how hide the volume HUD I had tried the solution that add MPVolumeView instance but won't WORK please give me another way to solve it Any suggestions would be appreciated. 回答1: You need to put volume overlay like this: MPVolumeView *volumeView = [

Custom MPVolumeView Thumb Image not vertically centered since iOS 5.1

会有一股神秘感。 提交于 2020-01-01 09:18:14
问题 I'm building an application that needs an MPVolumeView to control the volume. It worked perfectly before iOS 5.1 but since the 5.1 update the thumb image is no longer vertically centered. I tried a few things like changing imagine dimensions, resizing my views (and slider) but nothing seems to work, the thumb is just not vertically centered anymore. The only way i get a centered thumb is if i use the default iOS one. I tried adding a UISlider to another view with the exact min, max and thumb

Hide device Volume HUD view while adjusitng volume with MPVolumeView slider

懵懂的女人 提交于 2019-12-28 04:02:11
问题 I was implementing a video player with MPMoviePlayer in my iPad Application, used MPVolumeView for the volume control. My problem is that when i scroll the volume view to adjust the volume is showing the device's volume hud overlay as in the screenshot below. How can i disable this system volume indicator hud? My code is : @property (weak, nonatomic) IBOutlet MPVolumeView *playbackMPVolumeView; //Customizing controller - (void)customizeVolumeController { _playbackMPVolumeView.showsRouteButton

Add MPVolumeView to bottom toolbar

懵懂的女人 提交于 2019-12-24 17:42:22
问题 I am trying to add an instance of MPVolumeView to the bottom bar of my navigation controller.(the box for toolbar is ticked) I do not get any errors with my code, but when I run the project on my device the volume slider is not showing. Thanks in advance for any suggestions, here is my code: @interface ViewController () { AVPlayer *vPlayer; AVPlayerItem *playerItem; UISegmentedControl *segm; UIToolbar *toolbar; } @end @implementation ViewController @synthesize myViewVolume; @synthesize

Add MPVolumeView to bottom toolbar

♀尐吖头ヾ 提交于 2019-12-24 17:42:17
问题 I am trying to add an instance of MPVolumeView to the bottom bar of my navigation controller.(the box for toolbar is ticked) I do not get any errors with my code, but when I run the project on my device the volume slider is not showing. Thanks in advance for any suggestions, here is my code: @interface ViewController () { AVPlayer *vPlayer; AVPlayerItem *playerItem; UISegmentedControl *segm; UIToolbar *toolbar; } @end @implementation ViewController @synthesize myViewVolume; @synthesize

iPhone: Implement Volume control using buttons

眉间皱痕 提交于 2019-12-24 12:41:58
问题 Could anyone please tell me how could I implement the functionality of adjusting the volume on button click? Basically I am trying to put two buttons Volume Up and Volume Down but I couldn't find anyway to adjust the volume of button click. This link mentions about the MPVolumeView but I can't find it in my XCode 4.0 objects list and also I am not sure if I can use that for button click volume adjust. Could someone please point me in correct direction. 回答1: If I'm understanding you correctly,

AirPlay Meta Data on Apple TV from App (AVPlayer - MPVolumeView)

落爺英雄遲暮 提交于 2019-12-23 19:04:06
问题 I have my app successfully streaming an MP3 via AVPlayer. I implemented a MPVolumeView to pull in AirPlay support which works great but I notice that the title info on my apple tv, does not show anything from the streamed MP3 but rather just "Unknown" info. Is there anyway to control this info from the app or is this an issue caused by the MP3 being streamed? Any help would be much appreciated!! 回答1: I wanted to update this question in case someone else needed to control what is seen on their

MPVolumeView animation on iOS 8

旧巷老猫 提交于 2019-12-21 04:11:34
问题 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. 回答1: One possible way to remove this behavior is to subclass MPVolumeView and perform some additional work after [super layoutSubviews] . - (void)layoutSubviews { [super layoutSubviews]; [self cg_recursiveRemoveAnimationsOnView:self]; } - (void)cg_recursiveRemoveAnimationsOnView:(UIView *)view { [view

Swift: how to set the iphone volume programmatically [duplicate]

我只是一个虾纸丫 提交于 2019-12-18 04:12:44
问题 This question already has answers here : How to change device Volume on iOS - not music volume (8 answers) How to change an iOS device volume programmatically? (4 answers) Closed 3 years ago . I am trying to create an alarm app and I have noticed that apps like Sleep Cycle will set your volume to max right before the alarm goes off, even if you had the volume at very low. I have tried using AVAudioPlayer and all I have seen with MPVolumeView is that the user must do it. Is there any way I can