iphone

Using variable heights with NSFetchedResultsController?

What's the best way to design/use my model and NSFetchedResultsController so that I can use a table with variable height cells? Computing the height is expensive (and requires access to the model's data) so I'm caching the value in my model. However, I know that the tableview will ask for heights of all visible cells. My current thoug...

How do you show Xcode's build log? (Trying to verify if iPhone distribution build zip was created correctly.)

I'm trying to zip up my iPhone application for App Store distribution. The distribution instructions suggest looking in the build log to check if the mobileprovision file was included, but I can't figure out how to show a build log. Apple's instructions: To confirm your build was successful, check for the following: O...

Excel Sheet to iPhone Data -- Point A to Point B

As simple as possible: I have a very simple Excel spreadsheet with just over 1k records. I want to use this as a static datasource for an iPhone application. What's the best plan of attack? Possibilities in my mind: 1) Reading the XLS directly as a data source: is there an Obj-C lib for this? 2) Converting the XLS to a format that Ob...

How the view for second tab is loaded in iPhoneCoreDataRecipie project provided in ADC library

Hello all, I was going through the core Data recipie example application provided by apple. I saw they are using TabBarController. For first View controller I can see it being assigned to listviewController but What I did not understand is where are they assigning the view for weight converter. Like How is that being initialized, so whe...

How do I create a custom page curl Core Animation?

Hi! I'm trying to create a "page curl" animation of an image in my iPhone application. I t UIViewAnimationTransitionCurlUp, and it's undocumented Core Animation siblings, however the image I need to animate is a transparent PNG, with "uneven" (some alpha pixels) outlines. When using the aforementioned pre-made transition, those alpha pi...

Fade out UINavigationBarController.navigationBar?

I'd like to have my navigationBar fade out along with my status bar and setting animated: to YES does not work, since it just animates the navigationBar up. I have tried the following: [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.5]; self.navigationController.navigationBar.alpha = 0.0; [UIView commitAnimatio...

Core Data Query for iPhone

I am new to core data and before I was using sqlite. I found SQLite is not efficient and since my application is using extensive database communication, I have to compile the statements. With all this running my application breaks giving memory warnings, sometimes its views sometimes gets blank in between. Is it because of using SQLite...

UIImageWriteToSavedPhotosAlbum save as PNG with transparency?

I'm using UIImageWriteToSavedPhotosAlbum to save a UIImage to the user's photo album. The problem is that the image doesn't have transparency and is a JPG. I've got the pixel data set correctly to have transparency, but there doesn't seem to be a way to save in a transparency-supported format. Ideas? EDIT: There is no way to accomplish ...

terminating_due_to_uncaught_exception while trying to change views

I've been hitting this bug that I don't know what is wrong. When I debug this code and it hits here the program will lock up when it hit the addSubView line and says terminating_due_to_uncaught_exception I'm not sure if I'm forgetting something in interface builder or what but the codes does compile. ViewTypeView is the View's contro...

UIButton Background Images appear lighter in Simulator than in IB

Just put a background image on a button. The looks fine in IB but when I build and run the project in Simulator the bg is noticeably lighter. Anyone know why could be? Thanks! ...

Back-to-back UIScrollView zooming

Using OS 3.1 I'm placing a tap-detecting image view (taken from Apple's Scroll View suite samples) in a UIScrollView and want to zoom twice on the image view when it appears. The first zoom is to make the entire image visible and the second zoom is to zoom in to a specified region. What I have right now is: - (void)viewDidLoad { // ...

Is the Object retained in this case

Hello all, I have a simple question, that in a class I have a variable with property retain //Classs ArrayClass has this array @property(nonatomic, retain) NSMutableArray *array; Now when I do self.array = [SomeClass getArray]; I need to release the array... Now If I have object of ArrayClass and when I do arrayClassObj.array = ...

iphone UitextView Text cut off

Hi All: I have a Uitextview that is populated with a text file. I have a control on the page that allows the user to enable and disable paging. I am having a problem where the top and/or bottom line of the text is sometimes "split in half" so you can only see the top or bottom half of the line. I believe the code below should fix it....

iPhone dev -- performSelector:withObject:afterDelay or NSTimer?

To repeat a method call (or message send, I guess the appropriate term is) every x seconds, is it better to use an NSTimer (NSTimer's scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:) or to have the method recursively call itself at the end (using performSelector:withObject:afterDelay)? The latter doesn't use an object, b...

+requestAdWithDelegate: crashing because I'm in GSEventReceiveRunLoopMode?

This crashes (but without outputting any info to the Debugger; no dump, no trace): adMobAd = [AdMobView requestAdWithDelegate:self]; // start a new ad request [adMobAd retain]; // this will be released when it loads (or fails to load) I thought it was because my code isn't executing in NSDefaultRunLoopMode, which AdMob says is require...

How to implement a virtual D-Pad on iPhone?

I'm having trouble implementing a virtual D-pad in an EAGLView (OpenGL ES). I thought this would be simple but it is not. It is not so straightforward to determine whether a touch is on a certain portion of the D-Pad at any given time. Does anyone know of some good (relevant, please) resources online or could maybe post some source? ...

IBOutlet with retain property in iPhone and Memory releasing doubt?

When an autorelease string is assigned to an IBOutlet property, Is it getting retained. Like lets say I have an property @property(nonatomic, retain) IBOutlet UILabel *lblName; Now in my viewWillAppear I assign lblName a string as: lblName = [NSString stringWithFormat: @"NameString"]; So what is the retain count for this string, d...

How much memory does the prepared sqlite statements consumes in iPhone?

Hi, I am using sqlite database and I have around 15-20 queries I need to communicate database and extract data. What I am doing is preparing this querry while the allocation of an DBPersistence Object which takes care of communication with the database. This DBpersistence is a singleton class. My runtime memory consumption is almost 3...

UITextField in a tableView and disposing numeric keypad

I have a table view with each cell having a text field accepting numeric values only. I added the custom decimal place to the default numeric keypad, for my purpose. Since there is no "Done" button to dispose the keypad, I added a button over the table view. The button's background's opaque value is set to zero. The button is hidden when...

presentModalViewController from UIView

Hi Everyone: I am attempting to call presentModalViewController on a UIViewController in order to bring up a Address Book "view", however I am running into a bit of a problem. The UIViewController that "controls" the app simply draws a view to the screen and then lets the view do all of the handling of user interaction, etc. But now, ...