ipod

How To Switch music from my app to the ipod

大憨熊 提交于 2019-12-31 04:16:48
问题 i am using MusicPlayerController object in my app to play music. i know that its possible to keep playing my app music when it's terminate on the iphone ipod app. how can i do it? 回答1: There are a few things involved. You have to choose between two music players, the application music player and the iPod music player: + (MPMusicPlayerController *)applicationMusicPlayer; + (MPMusicPlayerController *)iPodMusicPlayer; If you choose the iPodMusicPlayer, music will continue to play in the

jpg image not displaying in safari (iphone 3gs and ipod)

瘦欲@ 提交于 2019-12-25 04:22:10
问题 I have this image : "http://interstatic01.gameloft.com/igp/videos/images/d9/end_screen_71.jpg" In this very simple html, it doesn't display for the 2 devices mentioned in the title. <!DOCTYPE html> <html> <head> </head> <body> <div ><!-- it may show full image depending on browsers, eg: firefox --> <img src="https://i.stack.imgur.com/nXxT5.jpg" /> </div> </body> </html> Note: if i enter the url directly in the url bar of the safari browser, i can see it. It just happens when it is in a tag or

iOS - Access output audio from background program

℡╲_俬逩灬. 提交于 2019-12-24 09:53:19
问题 Scenario: My app is running in the background. An iPhone/iPad user launches the iPod app (or Pandora or another program that plays audio) on their device and starts playing music. My app detects that that music is now playing, and records or in some way does things with the current playing audio (like stream it to a server), all while still running in the background. Is this possible? Can anyone point me in the right direction in the SDK on how to do this? 回答1: You can't do this. And that is

How i dismiss keyboard on tapping search button on keyboard regarding UISearchBar?

回眸只為那壹抹淺笑 提交于 2019-12-23 06:23:11
问题 I m developing an application in which i adding one control UISearchBar. When i started editing text in UIsearchBar then keypad is animated on the screen. After i completed my complete editing or canceling all text then i will stuck on point of dismissing keypad. How i dismiss keyboard on tapping search key form UIKeypad? Also same question for UITextField and UITextView? Thanks 回答1: Make sure the view controller which has the SearchBar implements the SearchBarDelegate and you set the

iOS: Playing audio in silent mode [duplicate]

倖福魔咒の 提交于 2019-12-23 03:53:13
问题 This question already has answers here : Play sound on iPhone even in silent mode [duplicate] (8 answers) Closed 6 years ago . What is the "correct" way to get my app to play audio even if the user's silent/mute switch is set to silent/vibrate? Some background: I actually got it working in debug stage, but when I submitted my app to Apple and then later downloaded it from the app store, the audio was disabled in silent mode! Here is how I got it working in debug stage: UInt32 sessionCategory

MPMediaLibraryDidChangeNotification called twice?

风流意气都作罢 提交于 2019-12-22 09:24:56
问题 My app uses the iPodMusicPlayer and, when suspended, the user might go out and make changes in Apple's Music App, for example creating or modifying a Playlist, then return to my App. I receive the expected MPMediaLibraryDidChangeNotification, which is fine and I deal with it updating my references etc., but I receive a second MPMediaLibraryDidChangeNotification about 2 minutes later which I really don't need. Any ideas on avoiding this second notification? [[NSNotificationCenter defaultCenter

MPMediaPickerController orientation on iPad

不羁岁月 提交于 2019-12-22 05:15:44
问题 How can I set correct orientation of MPMediaPickerController ? I've return YES in shouldAutorotateToInterfaceOrientation, but i have bad frame for Landscape (if show MPMediaPickerController in Portrait first, and conversely). I've rotating my device chaotically and sometime frame set to correct himself! I've find the method to set frame by rotating - need rotate to 180 degreess. For example, if you have good frame in Portrait, when you rotate to Landscape - you have bad frame (from Portatait)

How do I pop the view controller underneath a pushed view controller?

岁酱吖の 提交于 2019-12-20 12:34:12
问题 I want to push a view controller onto the stack, then pop the first one that pushed the new one. -(void) someMethod { MegaSuperAwesomeViewController *tempVC = [[MegaSuperAwesomeViewController alloc] init]; [self.navigationController pushViewController:tempVC animated:YES]; [tempVC release]; // pop this VC, how? } EDIT: turns out I can pop back 2 view controllers instead once finished with the new VC. Still not what I wanted exactly, but it works. The downside is I need to set a flag to

Is it possible to play sounds without stopping iPod music?

此生再无相见时 提交于 2019-12-20 01:39:40
问题 Is it possible to play sounds within an app without stopping iPod music? Right now I'm using the following, but it stops iPod music soundPath =[[NSBundle mainBundle] pathForResource:@"mySound" ofType:@"mp3"]; soundURL = [NSURL fileURLWithPath:soundPath]; mySound = [[AVAudioPlayer alloc] initWithContentsOfURL:soundURL error:nil]; [mySound prepareToPlay]; and then [mySound play]; 回答1: Yes you can, you could use the following code // setup session correctly AVAudioSession *audiosession =

IOS - Pause and Unpause Currently Playing Music

时间秒杀一切 提交于 2019-12-19 10:32:52
问题 I am working on a IOS app that I want to have the functionality to pause and unpause music that is currently playing through the ipod, just like the ipod's play/pause button. Is there anyway to do that through IOS? The only answers I have found for this is for dealing with songs and sounds played locally through the app. Any help would be fantastic. Thanks so much! 回答1: [[MPMusicPlayerController systemMusicPlayer] play]; [[MPMusicPlayerController systemMusicPlayer] pause]; 来源: https:/