iphone

how to hide keyboard on view disappear or button click iphone

Hi, I have a table view on a view and table view contains custom cells and cell contains text box. and i want to hide the keyboard when user click on save button or user navigate from the view. i already have hide the keyboard on done button.. plz can any one suggest. ...

data loading in UITableView like in iBooks search table

How can I tell UITableView to re-render itself when I add some new data? I am executing this code ib loadView method. [NSThread detachNewThreadSelector:@selector(addSomeData) toTarget:self withObject:nil]; This is addSomeData method: -(void)addSomeData{ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; for (int i = 1; i <...

Is there a pre-iOS 4 replacement or workaround for UINib?

My application features a tableview which contains some rather complex tableviewcells. Therefore, these cells have been designed in Interface Builder and are instanciated later as needed using UINib which allows just that - load the content from a nib and instanciate it as needed. But UINib is only available for iOS 4.0 and above. Befor...

cant able to exchanges elements in array

hi i am new to iPhone.what i did is creating an array with images as shown below images = [NSMutableArray alloc] initWithObjets:@"image1.jpg",@"image2.jpg",@"image3.jpg",@"image4.jpg",@"image5.jpg",@"image6.jpg",nil] and i create a button when ever button click images are exchanged for that i am writing code as fallows in button click...

Determining which UIViewController subclass that a UITabBar Item belongs to

I have a UITabBarController instansiated in my appDelegate, but I need a way to know when the user presses the different tab bar items (buttons on the tab bar). -UITabBarDelegate protocol to the rescue (with the required didSelectViewController-method)! With everything wired up in Interface Builder, how do I obtain a reference to the ...

NSDateFormatter is showing wrong date format (nachm. instead of PM) in the simulator

Why does the simulator is showing me 10:30 nachm. instead of 10:30 PM? I use the following code: NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat: @"h:mm a"]; NSLog(@"%@",[dateformat stringFromDate: myDate]); OK I think I have to set a Locale somewhere ... ...

how to make clear colour in uiwebview

hi i am having a uiwebview and i want to make it transperent as i have image in background in the imageview , i tried webView.backgroundColor = [UIColor clearColor]; but it didnt worked thanks ...

Is it possible to get UDID from iPhone safari browser?

I need to retrieve UDID (or any other device unique id) from iPhone safari browser (through cookies or request/response header or any other way). Is it possible if yes how? thanks -Z ...

how to sort array of strings

I create an array with string names as shown below NSMutableArray *strings = [[NSMutableArray alloc]init]; [string addObject:@"string1"]; [string addObject:@"string2"]; [string addObject:@"string3"]; [string addObject:@"string4"]; and I create a button. Whenever I click the button the strings are exchanged how can I do this? ...

memory leak when using transition

i get a memory leak and crash when using this transition more then 7-8 times: -(IBAction)pan1:(id)sender{ CATransition *transition = [CATransition animation]; transition.duration = 0.50; transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; NSString *types[4] = {kCATra...

How to play .asf file yon iPhone?

Hello, Any one know how to play .asf file on iPhone as iphone doesn't support asf file which I need to play for Radio streaming. Can anyone help me to solve this problem. Thanks in advance. Regards, Gurprit ...

Does UITextField consume touch events?

Hello, My view controller has UITextField object as a subview. The controller is set as target to handle the text field's UIControlEventTouchUpOutside event. I'm trying to use this event handler for dismissing keyboard when the text field becomes first responder, but it seems to be never called. Delegate methods like textFieldShouldRetu...

Build and Archive Option in XCode and Submit to iTunes

Although I have already submitted my app using Build And Archive and then clicking on the Submit to iTunes connect I will ask the question anyway. Apple says that select a Distribution profile when submitting to Apple. So, I went on iTunes and downloaded the Distribution profile. I added profile to xCode. I did the build and archive opti...

Audio Queue Services - recording

Hi I'm trying to record an audio stream which is streamed using matt gallagher's audio classes. So far, I've searched the web as I do not really understand the audio queue services. I'm quite new to iphone programming, and audio queue services is really a complex part of the iphone programming. I'm stuck on this part of the code : i...

Set padding for UITextField with UITextBorderStyleNone

Hi, I wanted to use a custom background for my UITextFields. This works fine except for the fact that I have to use UITextBorderStyleNone to make it look pretty. This forces the text to stick to the left without any padding. Can I set a padding manually so that it looks similar to UITextBorderStyleRounded except for using my custom bac...

glReadPixels crashes on specific render buffer widths

I need to read content of CAEAGLLayer, which has various widths and heights (based on background image size). on iPad emulator everything is okay, but on device I have crashes or weird horizontal lines instead of content. Crashes not happens on width, for example, from 537 to 544 pixels I'm using following code - (UIImage*)image { ...

Web service issue in iPhone

I have a web service used by my iPhone application.The application accesses the webservice to get authenticated. My question is how to intimate the user when the server doesn't sends any response when it is called. ie..The control doesn't comes to -(void) connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)...

How to compile Appcelerator Titanium's iPhone project in Xcode?

Hello All, Anybody know how to compile Titanium's iPhoen project in xcode. When I do I get this error. Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 Thanks Saurabh ...

Colouring Pins on a Map

Hello, I'm trying to mark a starting pin and ending pin on my map with different colours. Maybe the starting pin in green and the ending pin in red. My code below, reads the latitude / longitude coordinates from core data and loops around placing a red pin for each object found in core data. MapPin.h #import <Foundation/Foundation.h...

is it possible to download a file in my iphone throuh email

I am working on an application in which i write to an xml file and then send it through email and at the reciever end the receiver recives it in his/her inbox and download the file to the iphone and then open the same app on his phone and browse to this file and by clicking sync button the progra should parse the tags in the xml file. Ev...