iphone

How does loadNibNamed?

In most of the samples the return value from loadNibNamed value is not used, so I guess it's using the owner argument. But how does it work and make the connection to the owner object? What kind of requirements should my owner class meet in order to load a nib in such way? The only requirements I can guess is that the owner class mus...

frame rate on the iphone using mach_absolute_time

Hi, I have the following code, and wanted to get other set of eyes to make sure I have written the right code to calculate the frame rate of a scene. Could you please chime in? This is written for the iPad using SDK 3.2. thanks! - (void)drawView:(id)sender { mach_timebase_info_data_t timer; mach_timebase_info(&timer); uint64_t t1...

How can I install an older version of the iPhone SDK (v3.1.2) to work with the latest GM?

I installed the latest GM of the iPhone SDK and now I can't build and compile many of the example projects on the Apple iPhone dev site. When I load them, the configuration bar says "Base SDK is missing." It appears the example project I'm trying to build (QuartzDemo) is trying to build against the v3.1.2 SDK. How can I install an old...

Core Data fetch request fails with: 'NSInternalInconsistencyException', reason: 'statement is still active'

Basic app layout using the navigation controller template with core date: Delegate: persistenceCoordinator, managedObjectModel, managedObjectContext RootView: managedObjectContext (from delegate), addManagedObjectContext (using the pattern from the templates), fetchResultsController Add/Edit view (a hierarchy for adding Object A & it...

What's the point of the provisioning process Apple makes you complete in order to test your apps on an iOS device?

Today I walked to through the process of getting my iOS device connected to my computer and running my app. To do that, I had to... Obtain a developer certificate Assign the device to my team Obtain my app ID and create a provisioning profile While I understand the process and was able to successfully get my device connected, I don'...

Xcode, no debug symbols for certain subclass

I'm using Xcode 3.2.3 and iPhone SDK So I'm trying to debug a UIView subclass, I hit a breakpoint in an overridden method and I can't see any symbols in either the GUI or gdb, just globals and registers. This is what I see: (gdb) po self No symbol "self" in current context. Yet when I set a breakpoint in a UIViewController subclass,...

Access objective-c from c++

Can somebody point me in the right direction for this. I've found lots of info on using c++ in obj c but not the other way around. I am making an iPhone game in c++ but need to tap into some of the features the iPhone has to offer. Thanks ...

How to write a file with CRLF line breaks in Objective-C?

Hi, I need to create and export an excel file in my iPhone app. Unfortunately, excel won't read it if the line encoding is LF (the unix default when I write the file) instead of CRLF (the Windows standard)...Is there any way to write a file using CRLF line breaks? I can tell this is the issue as if I open the file in TextWrangler a...

Using NSXMLParser to extract attributes that are URL encoded?

Hello, I am trying to use NSXMLParser on the iPhone to parse a string that contains HTML, similar to the HTML shown below... <html><head><title>Working...</title></head><body><form method="POST" name="hiddenform" action="http://xxx/zfp"&gt;&lt;input type="hidden" name="wa" value="wsignin1.0" /><input type="hidden" name="wresult" value=...

Animate CALayer scale without blurring

I have a CALayer that implements drawInContext: and draws a simple circle, like so: - (void)drawInContext:(CGContextRef)ctx { CGContextScaleCTM(ctx, DrawingScale, DrawingScale); CGContextSetRGBFillColor (ctx, 1, 0, 0, 1); CGContextFillEllipseInRect (ctx, LocationRectangle); } I have been experimenting with different way...

Core Data NSDate Comparison

I am storing a date attribute in Core Data using the datePicker on the iPhone. I want to then compare the date that matches a certain date using == but I can't get it to work. The greater than and less than seem to working fine though. At first I was storing the date directly from the datePicker which also included the time information...

How do I load a new view and start navigation from there?

I've been googling this for days, and I'm pulling my hair out trying to get this to work. In my app, the very first view that loads is a view that has a login and signup button. Pressing the login button calls - (IBAction)login:(UIButton *)sender { LoginViewController *loginView = [[LoginViewController alloc] initWithNibName:@"LoginVi...

UILabel not aligning perfectly center when wrapping

See image for example: http://img25.imageshack.us/img25/6996/90754687.png The grey background indicates the size of the UILabel frame. For some reason, the first line of wrapped text doesn't seem to always center, even though I'm using UITextAlignmentCenter. Here's the code I use to set up my labels: self.titleLabel = [[UILabel a...

What's the difference between an Detail Disclosure Button and an Disclosure Indicator?

What's the difference between an Detail Disclosure Button and an Disclosure Indicator? For me, both things are the exact same thing, just that they look a little bit different. The first is a blue round button with an chevron to the right. The second is an simple chevron to the right. Both things mean the same, to me. They mean "more". ...

internally schedule an update in iphone

Hi, When the application which we built is offline or closed, Is it possible to pop up a message to open an application without the influence of back-end server ? Say for every one week ? ...

How to see the query string of an NSPredicate or an NSFetchRequest?

Is it possible to see the completed query string, with all the variables substituted to their actual values? Would be good for debugging... ...

How to download an image from the web and display it in an UIImageView?

How to download an image from the web and display it in an UIImageView? For example, I have an URL like: http://sstatic.net/so/apple-touch-icon.png Would I need to mess around with NSURLConnection and the like, or is there a simple method that takes an web URL and downloads the image data automatically? ...

Where can I find sample code for integrating iAds within my application?

I'm just starting to learn how to integrate iAds within my application. I have read all of the documentation on this provided by Apple, but I still have some questions about the process. Is there any sample code or better documentation out there that shows how to place iAds within an application? ...

Can NSXMLParser read Chinese?

I'm using an NSXMLParser to grab the an XML file on the web like so: NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url]; [xmlParser setDelegate:delegate]; [xmlParser parse]; [xmlParser release]; In the delegate I have the following code: - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementNam...

Does -dataWithContentsOfURL: of NSData work in a background thread?

Does -dataWithContentsOfURL: of NSData work in a background thread? ...