control-center

how to show seek track duration on control center

*爱你&永不变心* 提交于 2019-11-29 23:21:40
How do i pass the song info such as song name and track duration to control center. Player plays music fine and the play and pause control works fine though. Playing with apple's music app Playing with my app with the code below, how to pass song information in order to display it ? //AppDelegate -(void)setupAudio { // Set AVAudioSession NSError *sessionError = nil; [[AVAudioSession sharedInstance] setDelegate:self]; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:&sessionError]; // Change the default output audio route UInt32 doChangeDefaultRoute = 1;

How to change track position on lock screen/control center?

て烟熏妆下的殇ゞ 提交于 2019-11-29 01:38:50
问题 When playing a song with the ios 7 music app the user can use slider to change song position in the lock screen/the control center. Slider is active: But when playing music in my app user can't do it. Slider isn't active: How can i enable these feature in my app? 回答1: You can change track position with help of MPRemoteCommandCenter on iOS 9.1 and higher. if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_9_0) { MPRemoteCommandCenter *commandCenter = [MPRemoteCommandCenter

How does Spotify customize the media playback controls on iOS?

拜拜、爱过 提交于 2019-11-28 16:52:40
问题 Spotify on iOS has a very interesting Control Center integration. Notice the hamburger button below. The same thing is on the lock screen! How do they do those? Is there an API in MPMediaCenter or something? 回答1: Yes, there is an API for that Looking at the instructions found in the apple docs regarding remote control events you get two classes MPRemoteCommand and MPRemoteCommandCenter highlighted. Looking up MPRemoteCommandCenter will show you there are a multitude of commands like

Cannot open iPhone Control Center on simulator

笑着哭i 提交于 2019-11-28 02:56:17
问题 I'm new to iOS coming from Android. I try to run simulator and open the Control Center on it. When I swipe from the bottom to up I see that it's empty. Any ideas what's going on with my simulator? I tried at iPhoneX simulator and have the same. 回答1: Unfortunately the Simulator does not show a true Control Center. Yes, a blank screen appears, but no controls are available in there. Welcome to iOS ;] 回答2: The problem not in Xcode but in iOS 11 simulator Solved I download iOS 10 simulator and

Is there a public way to force MPNowPlayingInfoCenter to show podcast controls?

半世苍凉 提交于 2019-11-27 05:58:21
I would like Control Center (via MPNowPlayingInfoCenter) to show the forward 15 seconds / back 15 seconds controls that Apple shows with podcasts, like so: The utter lack of documentation tells me that there's no obvious way to do this, but has anyone out there found any non-obvious way to force this without resorting to a private method? I've already got my handling for the forward/back button set up to advance appropriately, I'd just like to use the more appropriate UI. Any help would be greatly appreciated. OK so I had a bit of time on my hands and so I followed the breadcrumb.… This is

Is it possible to disable Control Center in iOS 7 programmatically and if not, what are alternatives?

北慕城南 提交于 2019-11-26 22:15:10
I have developed an app that uses swipe gesture from bottom up. It was working perfectly in iOS 6, but now iOS 7 came out, and it works maybe 1 out of 25 times: i get iOS 7 Control Center almost every time. Obviously, Control Center can be disabled in the Settings, but that is up to the phone owner, and I cannot control that. So my question is, is there a way to disable Control Center for the time when my app is running (or more likely, is "active", as I would want Control Center back if the user is not actively using my app). If not, what are the alternatives? Is relocating/reworking that

Is there a public way to force MPNowPlayingInfoCenter to show podcast controls?

主宰稳场 提交于 2019-11-26 11:48:30
问题 I would like Control Center (via MPNowPlayingInfoCenter) to show the forward 15 seconds / back 15 seconds controls that Apple shows with podcasts, like so: The utter lack of documentation tells me that there\'s no obvious way to do this, but has anyone out there found any non-obvious way to force this without resorting to a private method? I\'ve already got my handling for the forward/back button set up to advance appropriately, I\'d just like to use the more appropriate UI. Any help would be

Is it possible to disable Control Center in iOS 7 programmatically and if not, what are alternatives?

╄→гoц情女王★ 提交于 2019-11-26 08:12:57
问题 I have developed an app that uses swipe gesture from bottom up. It was working perfectly in iOS 6, but now iOS 7 came out, and it works maybe 1 out of 25 times: i get iOS 7 Control Center almost every time. Obviously, Control Center can be disabled in the Settings, but that is up to the phone owner, and I cannot control that. So my question is, is there a way to disable Control Center for the time when my app is running (or more likely, is \"active\", as I would want Control Center back if