ios4

playing mp3 from nsbundle

烈酒焚心 提交于 2019-12-23 04:07:33
问题 SETUP I put a mp3 into my bundle just for testing, i will have them download into the documents directory. But for now i am going to work off the bundle. I have found a couple tutorials, but not anything for what i need. The below is definitely a mix of a couple solutions and probably not the best approach. Problem How do i pull a song out of my bundle and play within the app? //Create an instance of MPMusicPlayerController MPMusicPlayerController* myPlayer = [MPMusicPlayerController

MPMoviePlayerPlaybackDidFinishNotification not being called

独自空忆成欢 提交于 2019-12-23 04:07:09
问题 Here in my code playerPlayBackDidFinish is not called upon clicking the nextbutton and backButton on TopBar. but it is called when the video file is played completly, please help if anybody know... My code is as follows. #import "seq_nineViewController.h" @implementation seq_nineViewController @synthesize ninethVideoController, Bean; @synthesize localBackFlag; @synthesize goingNextButton, goingBackButton; - (void) viewWillAppear:(BOOL)animated { //[super viewWillAppear]; appDelegate =

Find assets in library - add to a AVMutableComposition - export = crash

拜拜、爱过 提交于 2019-12-23 04:06:06
问题 I've been struggling with adding assets from the iPhone Photo Library to a AVMutableComposition and then export them. Here is what I got: Finding the assets: (here I grab the AVURLAsset) -(void) findAssets { ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; // Enumerate just the photos and videos group by using ALAssetsGroupSavedPhotos. [library enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *group, BOOL *stop) { // Within the group enumeration block,

NSMutableURLRequest proper posting

亡梦爱人 提交于 2019-12-23 03:50:18
问题 So I am trying to log into my site using an NSMutableURLRequest which presents the credentials via a post. As a noobie, I have some questions about the functionality of this method to make sure I am understanding it. NSString *post = [NSString stringWithFormat:@"username=%@&password=%@&TARGET=%@",LoginId,LoginPwd,target]; NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; NSString *postLength = [NSString stringWithFormat:@"%d",[postData length]];

Should We use 2 different Images or Single Image for Landscape and Portrait Mode

北战南征 提交于 2019-12-23 03:32:29
问题 I am doing a app for iPad in which we have added two images one for Landscape and the other for portrait mode, I have written code for. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // in this method we have called landscape and portrait frames basing on the // status bar rotation if it is turned to landscape then the landscape image // is called and the textfields frames are set else portrait image is set and // then the textfield frames are

Should We use 2 different Images or Single Image for Landscape and Portrait Mode

为君一笑 提交于 2019-12-23 03:32:09
问题 I am doing a app for iPad in which we have added two images one for Landscape and the other for portrait mode, I have written code for. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // in this method we have called landscape and portrait frames basing on the // status bar rotation if it is turned to landscape then the landscape image // is called and the textfields frames are set else portrait image is set and // then the textfield frames are

is it a good idea to call viewdidload in a method?

徘徊边缘 提交于 2019-12-23 03:23:16
问题 I was just curious weather it is a good idea to call viewdidload a method like in an ibaction or something of that kind. thanks, TC 回答1: Check: UIViewController Class Reference viewDidLoad This method is called after the view controller has loaded its associated views into memory. This method is called regardless of whether the views were stored in a nib file or created programmatically in the loadView method. This method is most commonly used to perform additional initialization steps on

Running iPhone crash Logs from testers on XCode

随声附和 提交于 2019-12-23 03:03:35
问题 When I'm running my app on my device using XCode and I have a crash it's easy tracking where it happened on code. However, when I deploy my ad-hoc version to testers and they have a crash, is there a way for me to load the crash on XCode as if it crashed on my computer, actually seeing the stack and the variable values ? Thanks 回答1: As far as I know, there is no known method to obtain a full core dump file for iOS apps that you can later load on GDB. Are you already asking your testers to

Iphone UITableViewCell customazitaion

拈花ヽ惹草 提交于 2019-12-23 02:46:45
问题 I have a UInavigation controller, UITabelView with customized UITableViewCells, which I will create 4 different xib files for that custom cells, which I will get user input from them. I am a bit confused here, it is said every view should have its own controller in Iphone, so I will push a new subclass of UItableviewcontroller on stack for each page(UITableView), and in theory it should be responsible for the delegations of the uicomponents on that table. But each UItableVIew consists of

Is there a way to record an audio stream using Matt Gallagher's audio streamer?

半城伤御伤魂 提交于 2019-12-23 02:17:15
问题 I use Matt Gallagher's audio streamer for streaming radio stations. But how to record the audio? Is there a way to get the downloaded packets into NSData and save it in an audio file in the documents folder on the iPhone? Thanks 回答1: Yes, there is and I have done it. My problem is being able to play it back IN the same streamer (asked elsewhere). It will play back with the standard AVAudioPlayer in iOS. However, this will save the data to a file by writing it out in the streamer code. This