iphone

error when capturing camera and audio input

using some of the nifty new APIs in iOS4 i am trying to capture input from the iPhone's camera and microphone and save it to a file. below is the code i am using. AVCaptureSession* captureSession = [[AVCaptureSession alloc] init]; AVCaptureDevice *audioCaptureDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio]; AVCapt...

Iphone interface builder

hey all my question about how the developers makes their interface the buttons, slider, segmented control and other is any program can make those thing ? and then import it to interface builder ? my brother is a graphic designer and he work a lot a 3d modeling he can make all those thing in 3ds max, maya or cinema 4D but how to tell the ...

UITextView key pad becomes disabled

Using the following method in xcode im trying to generate some text once the user presses the return key on the key pad. However for some reason the key pad is disabled and I cannot get it to work again without removing the code: (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)te...

get the latitude and longitude from a point in MKMapView?

Hi, I am new for iPhone programming. I just want to implement a samll function that allows system to obtain a location on MKMapView where the user has touched. I wrote some code as following: #import "UIViewTouch.h" @implementation UIViewTouch @synthesize viewTouched; - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *) event{ ...

obtaining count in plist/array

Hi,for plist of the form: Root--> item1---> item2---> .... how can i obtain the count of the number of item1,2,3 etc? instead of using this: int i = 0; for(i=0; i<10; i++) //loop 9 times cos database got 10 { NSDictionary *item1 = [array2 objectAtIndex:i]; i<10 is what i want to change also for this plist: Root--> ...

How to calculate focusPointOfInterest for AVCaptureDevice?

How do you calculate the focusPointOfInterest (a CGPoint value between 0,0 and 1,1) for an given AVCaptureDevice? I've been following the code samples from the latest WWDC but I really don't understand how to calculation is being made. Also, my application is sitting in landscape vs. portrait (as in the sample) ... so in addition to no...

NSURLConnection validation

I am trying to validate weather the connection was successful but have been getting inconstant results. When I try to do an synchronous request using a bogus url with: NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; if (responseData) { did_send = TRUE; ...

Is it possible to change the root view of a tabBarItem so tapping takes you to the second view in the hierarchy?

In Obj-C / iOS. Our UI design calls for an initial screen with options to register or log on. After doing either of these, the user data is saved to the phone and a the tabBarController is shown. However, tapping on the tabBar at the bottom takes the view back to the "log on or register" screen. Is it possible to change the root view con...

Ipodtouch application license terms and conditions

First, excuse my english, I am french. 1- Hi, I would like to develop an app doing pedestrian rally in a specific city, displaying photos and question to user. 2- I would like to buy 15 Ipod touch under my name, and rent them for corporate activity. 3- I read that ad hoc distribution is good only for testing and/or for only employees ...

differences between uiwebview and mobile safari

Have looked far and wide for info and have found no definitive list. Please add your observations. I'm sure it will come in handy to all. ...

ADBannerView contents

Is there any way of knowing which ad loaded in an ADBannerView, or in any way control the ad that loads? ...

XCode installs debug apps on the 2nd page?

This is really just a minor annoyance, but whenever I go to test a new project in the iPhone Simulator, the app gets installed on the 2nd page of the simulator's dashboard even though there's plenty of space on the first page. Anyone happen to know why it does this, or if there's a way to get it to fill up that first page? I'd like t...

UISlider sender valuechanged

Hi, I'm using multiple UISliders on a form, and I want just one method to keep track of slider changes. Now I have a method: - (IBAction) slider1ValueChanged:(UISlider *)sender { somelabel.text = [NSString stringWithFormat:@" %.1f", [sender value]]; } But because I use multiple sliders, I want to use a switch statement to fi...

Add row in a TableView.

Hi, So I have two views, the first have my TableView and the second have my TextField and I want to add a row in my TableView with the text in my TextField. For the moment I can just add row with [myTableView addObject:@"Test 1"]; [myTableView addObject:@"Test 2"]; [myTableView addObject:@"Test 3"]; Thanks for your help! - (UITab...

How to determine the frame of a view after an iPhone is rotated, before the rotation actually takes place

I'm currently dealing with an iphone view controller which contains a paging UIScrollView, to display multiple pages of information. My application needs to support a landscape mode, and I've been having a bit of trouble figuring out the right way to implement this. In order to maintain view continuity, I want to resize my views manuall...

How to apply a solid color to a UISearchBar

I saw this post on SO: http://stackoverflow.com/questions/2232016/uisearchbar-solid-color But no answer was provided. I would like to know how to apply a solid color to a UISearchBar. I have applied a tintColor but it automatically creates a gradient. ...

Is there a forms builder for Cocoa?

As I have a complex domain model (DDD) where I need to create a few hundred forms in the user interface, I'm looking for a generator, preferably embedding the apple layout rules, and data binding. This is crucial to get a uniform application appearance. I would prefer the generating to be of run-time instances (introspection), not stat...

NSDate from NSString problems

Getting a NSString as follows: NSString *lastSyncDate = [[items objectAtIndex:0] objectForKey:@"LastSyncDate"]; This value is: 1/1/2010 12:00:00 AM I am using the following to convert to a date: NSDateFormatter *df = [[NSDateFormatter alloc] init]; [df setTimeStyle:NSDateFormatterFullStyle]; [df setDateFormat:@"MMMM d, y HH:mm:ss ZZ...

finished playing audio callback with finch

is there a finished playing callback with finch? similar to - audioPlayerDidFinishPlaying in the avaudioplayer stuff? looking through the code i could not find anything that referenced it. ...

iPhone, memory issues with UIImage animations.

I have an AnimationManager class which cycles through UIImages to create a 14 frame animation. The application runs out of memory when the animations are played over and over. It was my understanding that I should not release UIImage. I do however, release the array containing the images. What can I do to reduce the memory used by the ...