iphone

UITextField focus

How can I programmatically assign focus to a specific UITextField in a view? I have several fields and on view display, I'd like to put the cursor on a specific field, not the first one at top. ...

hold-to-copy in uiwebview subclass

For my app, I subclassed UIWebView (the method described here http://ryan-brubaker.blogspot.com/2009/01/iphone-sdk-uiwebview.html). I did this so that I could intercept touch events; when I detect certain types of taps, I perform the corresponding custom action, and then pass the event along to the underlying UIWebView. So for exampl...

Storing binary data within core data on an iPhone

If I record an audio file and I have a core data object representing that recording... should I be referencing just the url to the recording on disk, or could I just store it within core data? It's probably easier to just store it within core data, but doesn't sound like a very good idea. ...

What does "MyIdentifier" mean in Objective-c or iPhone programming

I am puzzled at the following line "static NSString *MyIdentifier = @"MyIdentifier";" in the method: cellForRowAtIndexPath What does that line do? Is it just creating a random pointer to an NSString object and assigning it the string? Why is it being called MyIdentifier, I have seen this in many examples. #import "AddToFavorites.h" @...

What's the best tutorial for iPhone development, sans Interface Builder?

I tried out Interface Builder, but I'd prefer just to write the code. I understand this is reasonable and many iPhone developers don't use IB. Does anyone know any good tutorials/resources about this? All I have found so far is this video: http://www.vimeo.com/3363949 ...

How to do a radar animation in the iPhone SDK?

Does anyone know how to animate a radar animation like the image below? With it growing outwards? I have to draw the circle using Quartz or some other way? ...

Hiding UIToolBar for child views of UITableViewController

My main controller is a subclass of UITableViewController with a UIToolBar at the bottom and when a row is selected, I'd like to display another view without the toolbar. How can I hide the UIToolBar in the child view? Right now, it's present throughout all child views unless they're created as modal. Toolbar is created in RootControlle...

Is this a job for NSTimer? Looping interface changes

A button on my inferface, when held down, will perform a series of changes on other parts of my interface. For instance, for one second some text will turn blue, then a UImageView will change its image for two secs ...etc etc... This series of changes will keep looping thru the same steps as long as the button is held down. I've neve...

Newbie question related to UIFont and UIColor

I have few questions related to UIColor and UIFont. I am wondering how heavy will it be on the system if I allocate a bunch of UIFonts and UIColors at the startup time, that I need for the duration of the application running. Is it expensive to create UIFont and UIColor at run time? Will it improve performance in any way if I pre alloc...

Downloading multiple files in iphone app(Objective c)

In my iPhone app I want to download multiple files which are on IIS with authentication. On a button click i want to start the downloading process. I know how to download a file with authentication. NSURLRequest* request = [NSURLRequest requestWithURL:mMovieURL cachePolicy:NSURLRequestU...

Best (Any) way blend tableview section header onto top of a grouped tableview

I'd like to add section headers to my grouped table view's sections but I'd like them to appear seamless (see image). The default, as we're all well aware of, is rounded top corners on the first row of a grouped table view cell so it ends up looking like crap when you merge them. Any way to specify when indexPath.row = 0 that the UITab...

[iPhone] Is there a way to achieve parallel scrolling of two tableview?

Let's say, i have two tableview inside a scrollview. After i scrolled up & down tableview1, and then touch and swipe to scroll the scrollview horizontally to tableview2, i want tableview2 to have the same vertical (up & down) position as tableview1. is there any way to achieve that? thanks ...

How can I make deleteRowsAtIndexPaths: work with GenericTableViewController?

I'm using Matt Gallagher's GenericTableViewController idea for controlling my UITableViews. My datasource is a NSFetchedResultsController. http://cocoawithlove.com/2008/12/heterogeneous-cells-in.html Everything is working fine, until I try to delete a cell. I have the following code in my View Controller: - (void)tableView:(UITableVi...

Upgrade to iPhone SDK 3.0 Causing UIKit Problems

I have an existing project that I was working on, and I recently decided to update my iPhone SDK and updated to the latest 3.0 SDK. I update my SDK and go to open my existing project. Sure enough, there are some problems including some certificate problems and so on. Anyway, google and I were able to solve most of them, but I haven't ...

Is it possible to detect if the cellular network is available?

I'm working on an iPhone app and I'd like to be able to check if the phone is able to make phone calls (and warn the user if not). This could be due to no cellular service being available or if the user has placed the phone in "airplane mode". I've looked around Apple's docs and I can't find anything that would let me check this. Am I...

circle slider problem

I had draw two circle in uiview and i can move one imageview (circle) between these two circles..... Like a circular slider design..Its works well... Now i want to Inherit this circles With uislider .... I want to view slider changes values according with its image circle changes in its circular path. How could i do this?Can any one hel...

Stalling in a game loop and removing sprites naturally

I'm making a game with cocos2d and I have a bunch of sprites that I would like to delete. For example I might have a bunch of characters on the screen but when my game is over I would like to clean them up. Right now I have created a special effect (particle system) as a distraction, but because it is transparent and does not cover all o...

AVAudioPlayer only plays in simulator but not device why?! (iPhone-SDK)

I have the following simple code that plays a sound NSString *soundPath = [[NSBundle mainBundle] pathForResource:@"sound" ofType:@"wav"]; player =[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath: soundPath] error:nil]; player.volume = 1; player.numberOfLoops = 0; [player prepareToPlay]; [player play];...

How do I get MySQL query-results using -initWithContentsOfURL ?

I have a server-side php-script that fetches results from a MySQL table. I am trying to retrieve these results from within an iPhone OS app. I am using the following method: NSURL *myURL = [NSURL URLWithString:@"http://www.someurl.com/login.php?id=anid"]; NSArray *sqlResults = [[NSArray alloc] initWithContentsOfURL:myURL]; //Show me wh...

upgrading from iphone beta to full 3.0

So I have been developing against the iphone 3.0 beta's and have just gone to upgrade to the final version released this week. however in itunes it says that i am currently using the latest version. any iphone developers out there know how do you upgrade to final version of 3.0? ...