iphone

StretchableImageWithLeftCapWidth stretching wrong portions

I am trying to use a UIImage with stretchableImageWithLeftCapWidth to set the image in my UIImageView but am encountering a strange scaling bug. Basically picture my image as an oval that is 31 pixels wide. The left and right 15 pixels are the caps and the middle single pixel is the scaled portion. This works fine if I set the left cap...

MPMoviePlayer in Simulator

I upgraded my Xcode to 3.2.2 and SDK from 3.1.2 to 3.2. Now when I try to start a video in MPMoviePlayer from an URL it shows the first frame, but never starts playing, even with the "MoviePlayer Sample Application" from Apple. Does anyone have any idea what can cause this or had similiar problems? edit: strangely it works in 3.0, but ...

Cannot find interface declaration for 'UIResponder'

Hi all, I am running into this issue when trying to compile code for an iPhone app that I inherited from a previous developer. I've poked around on a couple forums and it seems like the culprit may be a circular #import somewhere. First - Is there any easy way to find if this is the case/find what files the loop is in? Second - Its d...

how to create a auto-incremented attribute in xcode managed object model

Hey, what i want to do is to make a int that will be the ID of the entity and auto increment itself whenever a new entity is added (just like a SQL identity property). Is this possible? i tried using indexed (checked on attribute) however there is no description to what indexed even does. EDIT: I am adding annotations to a map, when y...

UIpopover is presenting user with a 'done' button that I can't get rid of

I'm not sure why this is coming up I am porting my app into an ipad version and moving one of my views which happens to be a navigation controller into a uipopover. I did have a uibarbutton item on the view im porting with a "done" button to dismiss the navcontroller but I commented out that code and its still appearing, not sure why. I...

Incorrect decrement of the reference count

I have the following problem: In one flow of the execution I use alloc, and on the other flow, alloc is not needed. At the end of the if statement, in any case, I release the object. When I do 'build and Analize' I get an error: 'Incorrect decrement of the reference count of an object is not owned by the caller'. How to solve that? UII...

iPhone - how to be notified of call completion

Hi- I'm developing an application that needs to take action on completed phone calls, preferably right after the call ends but minimally once per day. I've read up on the new CoreTelphony framework, and it seems I can get call events if my app is active, but I don't see how to launch/wake my app when a call ends if my app is not the for...

I can create a cookie, but can't delete it from my iPhone app

I am creating an iPhone app, and am using this method to create a cookie that will be accessed site-wide: NSMutableDictionary *cookieDictionary = [NSMutableDictionary dictionaryWithCapacity:4]; [cookieDictionary setObject:@"status" forKey:NSHTTPCookieName]; [cookieDictionary setObject:[self.usernameField text] forKey:NSHTTPCook...

What's wrong with how I'm using NSDateFormatter?

NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; dateFormatter.locale = [[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease]; [dateFormatter setDateFormat:@"EEE, d MMM yyyy HH:mm:ss zzz"]; NSString *dateString = @"Tue, 08 Jun 2010 17:00:00 EDT"; NSDate *eventDate = [dateFormatter dateFromStrin...

Custom UITableViewCell Best Practice?

I am always subclassing UITableViewCell's and drawing them in code. Is there a good tool to visually get rect sizes so I don't have to guess and check all the time? ...

start an iphone app from within another iphone app?

Is it possible to write a function in an iphone app A that when you click on a button within that app A it will close app A and automaticall open up App B ...

Drawing UITableViewCell in IB

Is it bad practice/not efficient to draw UITableViewCell in IB vs drawing in code? ...

Obj-C: Passing pointers to initialized classes in other classes

Hey all. I initialized a class in my singleton called DataModel. Now, from my UIViewController, when I click a button, I have a method that is trying to access that class so that I may add an object to one of its dictionaries. My get/set method passes back the pointer to the class from my singleton, but when I am back in my UIViewCont...

iPhone RPG scrolling text for dialogue

Hello! I have an RPG in development, but I'm still confused about the best way to display dialogue. I want there to be a text box with text that scrolls (like any RPG), but what is the best way to accomplish this using X-Code? Thanks! ...

How do I get google protocol buffer messages over a socket connection without disconnecting the client?

Hi there, I'm attempting to send a .proto message from an iPhone application to a Java server via a socket connection. However so far I'm running into an issue when it comes to the server receiving the data; it only seems to process it after the client connection has been terminated. This points to me that the data is getting sent, but ...

jquery.hover on iphone

I use jquery.hover to toggle a class when someone mouses over a link. On the iphone when someone taps the link, it toggles the class on, but it doesn't ever toggle the class off until they tap somewhere else. ...

Custom UITableViewCell not appearing when row height is set

I have a custom UITableViewCell which I have created in IB. My labels display when I don't over-ride: - (CGFloat)tableView:(UITableView *)tblView heightForRowAtIndexPath:(NSIndexPath *)indexPath however my content is squished. I want the height to be 120px so I have the following: - (CGFloat)tableView:(UITableView *)tblView heightFor...

Password test in 1st Tab.m to load a loginView gives class error?

I have a name and password in NSUserDefaults for login. I have this in my 1stTab View.m class to test for presence and load a login/signup loginView.xib modally if there is no password or name stored in the app. Here is the pulling of the defaults: -(void)refreshFields { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaul...

Reading html with accented characters from a URL on iPhone

Hello, I'm having trouble extracting the html from a website which contains accented characters. Specifically, there are French characters on the site. Currently I'm using: NSString* html= [NSString stringWithContentsOfURL: [NSURL URLWithString: url] usedEncoding: &enc error:&error]; to get html from a URL. It works perfectly fine fo...

Using NSPredicate to segment table by dates in iPhone

I have an array of dictionaries with several jobs. I want to have a table display these jobs sorted by month - year. How could i divide that array so i end up having for example: section: july 2009 and the amount of rows for each job in that date. section: august 2009 and the amount of rows for each job in that date. and so on. Thanks...