iphone

iPhone Quartz2D: simple animation via delayed drawing

I'm trying to implement some very simple line drawing animation for my iPhone app. I would like to draw a rectangle on my view after a delay. I'm using performSelector to run my drawing method. -(void) drawRowAndColumn: (id) rowAndColumn { int rc = [rowAndColumn intValue]; CGContextRef context = UIGraphicsGetCurrentContext(); ...

Using directory with WebViewUI

I've got 60 or so web pages that I'd like to put into a directory. How can I modify this webview loadrequest to pull content from a directory? [webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath: [[NSBundle mainBundle] pathForResource:docPage ofType:@"html"]isDirectory:NO]]]; ...

How to release MPMoviePlayerController?

I have a couple of views that access the movie player. I've put the following code in a method in AppDelegate for these views. They send in the filename to play. The code works fine but I know a release is required somewhere. If I add the last line as a release or autorelease, the app will crash once the user presses done on the movi...

UIButton icons on UIBarbutton

Is there any easy way to use the UIButton icons (UIButtonTypeInfoLight) on a UIBarButton item, short of creating it as an image (I'm pretty clumsy when it comes to Photoshop)? Are the images available to address somewhere? ...

Development for iPhone on PPC-based computer

It has been said elsewhere that developing for iPhone requires an Intel-based computer, but this doesn't seem to be the case according to the few introductory Apple docs I've read. See this for example, which says merely, "To develop applications for iPhone OS, you need a Mac OS X computer running the Xcode tools." Can anyone provide a r...

UITableView scrolls to far and causes weird things

I have a UITableView that when scrolled to far bounces bag. This also means the user can drag the table so that only half of it is visible and the other half of the main view is white. This causes some weird behavior in my app. I create an array in the AppDelegate. In RootViewController's viewDidLoad, I get a reference to the AppDele...

How Do I Initialize a View When Using Navigation Controller

I have a table view that's showing a list of bank transactions. When I tap one, I'd like to show the editing dialog, initialized with the current data. I'm doing something like this currently to get the controller and to initialize the text fields on its view: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPa...

How solve slow scrolling in UITableView

I test for first time in the real device, and after fixing some obvious performance problems I'm stuck in how do a smoth scrolling. This is what I do: The data is in sqlite I have a small array with the header I have in each header array the list of Id's from the Db Ej: Header A Ids= 1,2 Header B Ids= 3,4 I load lazy the c...

NSString Compare Not Working in Objective-C

Following is Objective-C code where I'm trying to do a compare between two NSString values, however it throws a runtime error. Here's the code: NSDictionary *innerContent=[JSONResponseDict valueForKey:@"JSONRESPONSE"]; NSString *authFlag = [innerContent valueForKey:@"authenticationFlag"]; NSLog(@"authFlag = %@",authFlag); UIAlertView ...

Question about character of NSString invalid in URL on iPhone

Some of my http request has 'space' in URL, but it is not recognized by iPhone. I have to change 'space' to '%20' whenever there is a 'space' in the url. Now I have to send a message typed by the user to the server and it can have as many 'spaces' as the user like. It looks like I have to replace them all.(stringByReplacingOccurrencesOfS...

Creating an iPhone library/framework

Are there any tutorials describing how to create a library or is it framework for the iPhone? I have a number of methods that are shared between applications. These will be better maintained as a library. ...

Testing use of NSURLConnection with HTTP response error statuses

I'm writing an iPhone application that needs to get some data from a web server. I'm using NSURLConnection to do the HTTP request, which works well, but I'm having trouble unit testing my code in the case where the response has an HTTP error code (like 404 or 500). I'm using GTM for unit testing and OCMock for mocking. When the server ...

iPhone web app startup screen

I'm working on an iPhone web app where I'm using the "apple-mobile-web-app-capable" meta tag to get "full screen mode". When I lauch the app it shows a picture of the page where I left of the last time while it loads. It looks like the app is ready to receive input when it is not, and that's confusing. Is it possible to change the defa...

Help to insert a new section in a TableView

Hi, Everyone keep writing about deleting a section. Well, I can't seem to get one added. Currently, I am trying like this (which fails with NSInternalInconsistencyException): UITableView *tv = (UITableView *) self.tableView; if ([tv numberOfSections] == 1) { [tv beginUpdates]; [tv insertSections:[NSIndexSet indexSetWithInde...

IPhone/Safari: Is there a way to stop resizing the page on load?

This is a long shot but I'm hoping there's a way to stop IPhones from resizing a page on load. Problem is if it's a site with a lot of need for refreshing (Say a forum) it gets a little old for users to have to resize that page every refresh. Is there a way to force Safari/The IPhnone to not minimize the site on refresh that doesn't in...

iPhone App Store. Client submitting question

I am writing an application which will be submitted by my client. I don't want to give them my source code, what must I do? ...

UITableView - implementing index

Hi, I want to implement an index that is being displayed at the right side of a table. I've found out how to display it. How can I scroll to a certain position in my table, after a certain index item was pressed? In the index I am not displaying all the alphabet, but in the following manner: #define ALPHA_ARRAY= @"A●D●G●J●M●P●S●V●Z" ...

Language for phone software development

Exists an universal phone developement language? I mean, for example, php or java or whatever Edit : We have to develop a few phone applicatons, and we are looking for the best reusable language in differents devices (Blackberry, iPhone, Motorola, etc) ...

Determining speed of shake

Is it possible to determine the speed at which someone is shaking their iPhone? This would be the time they start moving to the ending point where they are now going back to the origin. Basically it is one swipe that I'd like to measure the speed of. This discussion comments on initial speed: http://discussions.apple.com/message.jspa?...

How to "blend/merge" two images usingi an objective-c library?

Hi, I'm wondering if there is some image manipulation library that will allow me to take two images and blend them together. Or blend together parts of images in a mosaic so that it doesn't look like its a mosaic, but is one whole image. I've looked on google code and searched for such a library, but couldn't find anything. Thanks!...