iphone-sdk-3.1

Help stopping audio using AVAudioPlayer

岁酱吖の 提交于 2020-01-13 07:33:09
问题 Alright I have two problems. I'm using AVAudioPlayer to play a simple audio file in .caf format. What I'm trying to do is have a play and pause button. Here is a sample of a simple IBAction to play the audio from a button. - (IBAction) clear { NSString *path = [[NSBundle mainBundle] pathForResource:@"clear" ofType:@"caf"]; AVAudioPlayer* myAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL]; myAudio.delegate = self; myAudio.volume = 1.0; myAudio

Help stopping audio using AVAudioPlayer

和自甴很熟 提交于 2020-01-13 07:33:08
问题 Alright I have two problems. I'm using AVAudioPlayer to play a simple audio file in .caf format. What I'm trying to do is have a play and pause button. Here is a sample of a simple IBAction to play the audio from a button. - (IBAction) clear { NSString *path = [[NSBundle mainBundle] pathForResource:@"clear" ofType:@"caf"]; AVAudioPlayer* myAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL]; myAudio.delegate = self; myAudio.volume = 1.0; myAudio

App crashes after launching on OS 3.1

允我心安 提交于 2019-12-24 15:42:13
问题 I need help to understand the crash log i received from the client. The app works fine on my phone but it crashes with him. I have OS 3.0 installed here while my client has upgraded to OS 3.1. Client reported app crashes usually when he starts the app. Why I am getting EXC_CRASH (SIGABRT)? Can anybody point me in the right direction here? Incident Identifier: AA3A4B6A-BD0D-473F-B1D2-EF9655A0116E CrashReporter Key: f3a4736dc8d450a3cb0ecb7367313dbbd816c484 Process: MyApp [730] Path: /var/mobile

Finding the distance, currency, temperature units etc. for a country (iPhone)

孤者浪人 提交于 2019-12-18 11:45:03
问题 During the localization of my app I went through a lot of documentation, somewhere Im sure I read that there is a way to get a set of units that is linked with the locale. I believe it said something like "units based on cultural..." something. I would like to display temperature and distance in Fahrenheit and Miles for some countries and Celsius and Kilometers for other countries. Is there a way to access a list of these units in the iPhone SDK. Thanks you. 回答1: You can use NSLocale to check

Symbol not found: _OBJC_CLASS_$_UIPopoverController

ε祈祈猫儿з 提交于 2019-12-17 22:36:39
问题 I am having problems with my universal app. I have set the Base SDK to iPhone 3.2 and set the target to 3.1. I have moved the files that are using the UIPopoverController to their own files and they shouldn't be loaded when loading the app on the iPhone. Still, when I build my app I get the following error when I build and debug to my device: dyld: Symbol not found: _OBJC_CLASS_$_UIPopoverController Referenced from: /var/mobile/Applications/B3B90643-92DC-4E5C-8B2F-83A42D6D57E0/citybikes.app

iPhone: taking a picture programmatically

爷,独闯天下 提交于 2019-12-11 12:39:28
问题 I'm trying to use the UIImagePickerController interface from OS 3.1, with the cameraOverlayView and takePicture, but I've clearly failed to understand how this works, and so I'm not getting the behaviour I want. What I want to do is open the camera and take a picture automatically without having to having the user interact with the picker or edit the image. So I subclass UIImagePickerController (similar to the example in http://github.com/pmark/Helpful-iPhone-Utilities/tree/master/BTL

iPhone SDK Invert the Colors of a UIImage

喜欢而已 提交于 2019-12-10 16:45:11
问题 I've got an iPhone app that allows a person to draw something on the screen with their finger. They draw with a white line on a black background. However, when I upload this image to the web server, the line itself is white. I have been trying to work through the core graphics libraries in search of a way to invert the colour of the drawn image. There is no background set so it should be transparent. Doing an image invert should swap the white to black. Does anyone know if this is possible

MMS Streaming in iPhone Application

寵の児 提交于 2019-12-08 04:32:24
问题 hope you all are fine and also in one of your best of moods!! I have a query to ask you. I have few mms at server side. I want to stream those mms clips and want to open in my Application. anybody has any idea how to do this?? kindly share your knowledge... Looking forwards!! Regards, Arun Thakkar 回答1: You can either open your MMS url directly in a UIWebView or in a MPMoviePlayerController . Properly encode your MMS file, so that can be played in iPhone. e.g. http://ec2-174-129-153-104

CorePlot problems

青春壹個敷衍的年華 提交于 2019-12-05 05:34:51
问题 I started with core-plot now and came to some problems. I followed the tutorial from this page: http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application and completed with the instructions from this page: http://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications (such as -all_load). But I still have some problems, I get the following errors: error: incompatible type for argument 1 of 'setMajorIntervalLength:' error: request for member 'axisLabelOffset' in

Rotate the content of a MKMapView

扶醉桌前 提交于 2019-12-04 01:48:55
问题 I need to rotate the content of the mapView according to the compass value: float myHeadingValue = newHeading.trueHeading; and for rotating the map I use this: [mapView setTransform:CGAffineTransformMakeRotation( [self degreesToRadians:myHeadingValue] )]; but it rotates the view, not the content of the view. How can I make it to rotate the content, not the whole view? 回答1: There may be an issue with the google logo being out of shot doing this though. Apple have contacted me to say that my