I have a sound file I play using AVAudioPlayer. Simultaneously I record using AVAudioRecorder, both at 44.1kHz. I prepare the player/recorder, call play/record one right after the other, and have the recorder stop when AVAudioPlayers delegate audioPlayerDidFinishPlaying is called.
When I look at the recorded audio file I see the recordi...
I'm looking to build a little toy app that is very similar to a voip application. One person would hold one iphone and talk to the other iphone. I don't want to use gamekit because it forces a p2p connection and does not work over 3g. I'm worrying about the server side of this later but just wanted to get started with the iPhone side of ...
Writing my first app with CoreData. The book I'm using to guide me has code like this:
// 'Person' is my managed object class
Person *newPerson = [NSEntityDescription
insertNewObjectForEntityForName:@"Person"
inManagedObjectContext:self.managedObjectContext];
[newPerson setValue:nameField.text forKey:@"name"];
The book says that...
I have a JSON return being formatted and saved into a plist, it looks like the following:
I need it to have the following format:
I'm missing something in the saving of the array so I can add the "Rows" below the Root and "Item 0, etc" under the profile, any ideas?
Here is my code:
NSURL *url = [NSURL URLWithString:@"http://1...
I've been rattling my brain trying to figure this out -- I am playing some videos with MoviePlayerViewController, but when I try to shake to play a random video via the accelerometer, I get a crash when it tries to switch to the new movie.
Here is the code that plays the movie:
-(void)playMovieAtURL:(NSURL*)theURL {
...
In OpenGL ES 1.1 (using Objective-C), what is the easiest way to create a circle, and for a sphere? I would prefer for it to be easy to implement, as I am new to OpenGL.
Thanks
jrtc27
...
I have a view with a tableView and a mapView. In portrait mode, I want the mapView to occupy the top 60% of the screen, and the table view, the bottom 40%. In landscape, I want the mapView to occupy 45% of the screen on the right, and the tableView 55% on the left.
Thus, I thought that something like this ought to work:
-(void)wi...
Hello All,
Im writing an app that I would like to display different views based on orientation. For example, if the device is portrait load pView, if landscape load lView. Below is the code ive currently tried.
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)
interfaceOrientation duration:(NSTimeInterval)durat...
Sorry for the duplicaiton, but I've been googlin' for hours now without any result.
I have this (optimized) data of a simple cube exported from a converter:
// 8 Verticies
// 4 Texture Coordinates
// 6 Normals
// 12 Triangles
static GLshort cubeFace_indicies[12][9] = {
// Box001
{2,0,3 ,0,0,0 ,0,1,2 }, {1,3,0 ,0,0,0 ,3,2,1 }, ...
I am trying to get all css link from html like this segment of code:
<link href="http://media.ticketmaster.com/en-us/css/1c84b57773d8f594407f0b0b78d67aba/tm/default.css" rel="stylesheet" type="text/css" />
<link type="text/css" rel="stylesheet" href="http://media.ticketmaster.com/en-us/css/1c84b57773d8f594407f0b0b78d67aba/tm/datepicker....
Organizer states, “The version of iPhone OS doesn’t match iPhone OS supported for development”, but this is the message that I get...
But as you can see, I have 4.0 (8A293) on iPhone, and the same Xcode OS (8A293). So why is it having an issue?
My Organizer indicator color doesn't turn green like it used to either, only get orange. T...
My iPhone app has a UIWebView that loads a page containing javascript that sets a cookie. It seems that if i set a cookie and exit the app within 10-15 seconds then the cookie is never saved, however if i set the cookie, wait 10-15 seconds THEN exit the app, the cookie is saved.
Anyone have any info about why their is a delay and how t...
Hi all,
In my app I send a request to get images from flickr. I have went
through my app step-by-step with a breakpoint and found the app
crashes at this line in TTURLRequest.m:
} else {
return [self.urlPath md5Hash];
}
I get this error in the debugger:
* Terminating app due to uncaught exception
'NSInvalidArgume...
Is the select control available as an API? when you select text you are presented with cut/copy..options I would like to add another one. is it possible if so how?
...
Here is the problem:
The app crashes at the 2nd line, and I got EXC_BAD_ACCESS exception.
NSURL *url = [NSURL URLWithString:@"..."];
NSError *error = nil;
NSData *data = [NSData dataWithContentsOfURL:url
options:NSDataReadingMapped
error:&error];
NSLog(@"Error: %@", error);
NSLog(@"%@", [data length]);
I got:...
I would like to do something similar for an HTML document or PDF. How should I go about implementing this feature?
...
I am trying to create an app that scales up nicely on the iPhone 4. Currently most of it scales up perfectly, except for one crucial piece: the text that I draw inside a CALayer, inside its drawInContext: method. Here is my code:
- (void)drawInContext:(CGContextRef)context {
UIGraphicsPushContext(context);
CGContextSetGrayFill...
This somewhat related to another post - but that one got kinda messed up - so I start from scratch:
I have a CATiledLayer with a HUGE image in it (5780x6700px).
The tiled layer is in a scrollview. When I start to scroll around, everything's fine up to a point where obviously too many tiles have been rendered. Then I get a memory warnin...
I am following Stanford's iPhone Development course in iTunes U and I'm having problem with one of their assignments (Paparazzi, if anyone is familiar).
What I'm trying to do is basically to create this view as the first 'screen' upon application launch:
And this is the code that I have in the app delegate:
- (BOOL)application:(UIAp...
Hello
I have working code:
[self performSelector:@selector(doSomething) ];
but when I change this line to:
[self performSelector:@selector(doSomething) withObject:nil afterDelay:1.0];
it reports error - unrecognized selector....
could you tell me what is the problem in?
thank you
...