iphone

UIActivityIndicator during Quartz drawing operations

I understand that to use the UIActivityIndicator you must start it in the main thread, and then do your long running operation on a background thread. I also understand that all UIKit operations should be done on the main thread as well. But what I am faced with now is a long running operation to create CALayers using the Quartz CGCont...

Drawing a Shadow after the CGContextClip with Core Graphics

UPDATE: I tried implementing the method specified by Peter and am getting incorrect shadowing. What is wrong? CGContextSetShadowWithColor(c, CGSizeMake(4, 4), kAudioThumbShadowBlur, [[UAColor blackColor] CGColor]); CGContextFillPath(c); CGMutablePathRef path = CGPathCreateMutable(); CGPathMoveToPoint(path, NULL, minx, mid...

A Non editable UITableView section ?

I have a UITableView with 3 sections. The top two sections are static, and the third can be manipulated by the user. By overriding the commitEditingStyle method, I can remove entries as needed from section 3. However, doing this makes the Delete button appear on the cells in sections 0 and 1, even though I only execute the code when t...

How do I make the modal view only come up half way?

So I have an app where you play a game, and at the end it asks you your name for recording of the high score. I would like to use a modal view to accomplish this, but I am experiencing some hiccups along the way. So far, all I have is the modal view sliding up all the way to the top of the screen, but there isn't anything there yet, it's...

UITableView covering up other elements?

I'm writing my first iphone app and through several examples I've got a UITableView which is displaying some records from an sqlite db. I placed the element through IB and then had to set it's height inside of my view controller, in the viewDidLoad method: self.tableView.frame = CGRectMake(0,150,320,300); While the positioning appears...

Any way to "pin" something to the bottom for rotation?

I have a view with a button at the bottom of the portrait screen, when I flip to landscape my tableview and everything else adjusts fine, but my button at the bottom is now missing. I can't find a property in IB that would allow me to make the position of that button relative to the bottom of the screen, so that if it flips to landscape...

Setting Xcode's target to iPhone NOT iPad

I just upgraded to iPhone SDK 3.2 Beta 4. Since doing so, I have not been able to get the app to launch in the iPhone simulator - it keeps launching in the iPad simulator. I have tried option-clicking the drop-down menu in the top left-corner of Xcode and setting 'Active Executable' to iPhone simulator 3.1.3 but it keeps going back to iP...

Arrange UIView subviews in relation to outside UIViews

How do I arrange (in terms of depth) a view's subview to be in front of another view? The hierarchy looks like this: A-- -C -D B-- -E -F (A and B are views with C & D, and E & F, as subviews, respectively.) B is layered above A, so every subview in B (E and F) is above every subview in A (C and D). How can I make C displ...

Determining distance using mapkit

How is a 1000ft or 1/2 mile distance determined with mapkit? Either a radius from some pin or the distance between two pins. For example, I center the map on pin A. Pins B, C, and D are also on the map at various distances from pin A. B and C are within 1/2 mile from A but D is 1 mile away. I'd like to know that B and C are within 1...

How do I apply a sepia tone to a photo with on the iPhone?

How do I apply a sepia tone to a photo with Cocoa Touch on the iPhone? ...

How do I move a block of code in a method for "efficiency" purposes?

I think I have a conceptual misunderstanding and would appreciate an explanation. Within a class, I had the same block of code repeating 3 times (and working perfectly) but to try to make things more "efficient" I took it out and made a method within the class as follows: - (void)dateUP { NSLog(@"dateUp"); [UIView beginAnimations:@"dat...

Problem With HTML5 Application Cache Whitelist - Won't Ignore Items

I'm trying to use HTML5 Application Cache to speed some things up on an iPhone webapp. It works great for storing images, css and JS, but the problem is that it also tries to store the HTML. I haven't been able to get it to ignore the html and stop storing it in the cache. From what I've read, I have to "whitelist" the files and direc...

Where get data/api for get food recipe and/or nutrition facts?

I'm thinking in build a iPhone app for get recipes. So, I'm looking for resources where I can get the data of that recipes in a way I can use in my app, store locally and/or query. I'm interested in get nutrition facts, photos, etc... I understand that maybe I need to collect the data from several sources (like flickr photos?), but any ...

Why is the control flow not entering @selector(methodname)?

I've written some code for a button action. First I'm creating a button "UI", and its onAction should call ButtonListener in @selector in addTarget. But it doesn't seem to be entering the @selector(UIButtonListener) method. Here's my code: UIButton_G_obj = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; UIButton_G_obj.fram...

insert terms and condition page in iphone application code that is loaded when application is installed

hi, i have developed an iphone application where i have generated a terms and condition page and i wand that page to load only at that time of installation and not everytime application is run on iphone. Is there any any way to do this... i am done with this.... should i insert it into the application bundle and show it into settings....

Efficiently build two versions of an Iphone app from a single Xcode project?

I want to make paid and free versions of my app. I want to structure things so that I can build one version or the other with as few changes as possible. As far as the source code is concerned, this is easily accomplished by having a BOOL constant isFreeVersion somewhere, and referring to it as needed. But how should I set everything ...

Parsing nested JSON objects with JSON Framework for Objective-C

I have the following JSON object: { "response": { "status": 200 }, "messages": [ { "message": { "user": "value" "pass": "value", "url": "value" } ] } } I am using JSON-Framework (also tried JSON Touch) to parse through this and create a dictionary. I want to access the...

iPod/iPhone OpenGL ES UIView flashes when updating

I have a simple iPhone application which uses OpenGL ES (v1) to draw a line based on the touches of the user. In the XCode Simulator, the code works perfectly. However, when I install the app onto an iPod or iPhone, the OpenGL ES view "flashes" when drawing the line. If I disable the line drawing, the flash disappears. By "flash", I ...

iPhone: Custom UITableViewCell with multiple areas that respond to taps?

I've been asked to create a custom UITableViewCell with multiple areas that can be tapped. These areas won't have buttons or any graphics - they'll be invisible. 3 different methods will be called depending on which third of the cell the user taps i.e. || decrementFooCount || viewFooDetails || incrementFooCount || The cell has a few...

"About..." page on iPhone

I'm asking all those who have apps in the Apple iPhone App Store. Do you have an "About..." window/page/view in your app, or do you rely on iTunes for providing the developer info to the customer? If the former, where's the button/link to that? Real estate is so precious on the iPhone screen, I cannot think of some space I can waste for ...