cocoa-touch

UITableView Drawing Problems When ReloadData Is Called

Hey guys, I have a pretty large list of 'items' (up to 250 entries) which is constantly changing. The list is being displayed in a UITableView. I have a polling thread that will download some new entries and insert them into a SQLite DB. When new entries have arrived, I call to my table view data source object to update its data set, ...

Removing View from its SuperView, Notifying the Subviews on iPhone

Hello All, What event is fired when a view is removed from its super view? Do its sub-views receive any message? For example, I have subview2 and subview3 added to subview1 as in super_view -> subview1 -> subview2 -> subview3 if I remove subview1 e.g. by [code] [subview1 removeFromSuperview]; [/code] What event its subviews(subview...

Add name to the Address Book of the iphone.

Hi, In the iphone app,I've a form with details such as name,address. I need to save the name,address in the form to the iPhone AddressBook.Please someone help me how to do this. Thanks in advance. ...

iPhone code leaks and I don't know why

Hi, this is a well known snippet, how to select a picture from the iPhone photo library: - (IBAction)selectExistingPicture { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker....

Capture touches in a UITextField overlay view (OS3.0)?

Hello, I'm having incredible trouble capturing iPhone touch events in a UITextField rightView overlay. In OS 2.2.x I could implement the touches ended event to respond. However, in OS 3.0 the event doesn't seem to fire at all. My overlay is an icon the I put in a standard UITexField. It's supposed to bring up a dialog box when the user ...

iPhone App Delete Photos

Is it possible to delete photos within an iPhone Application? My application takes pictures and puts them in the Saved folder on the iPhone. I want to allow the user to delete these pictures throught the application as well. ...

Setting hidesBottomBarWhenPushed leaves bottom bar missing after View Controller is popped

I have the following setup: A tab bar app. On one tab there is a navigation controller. My workflow: When I push a new viewController onto the navigation controller stack, I set the hidesBottomBarWhenPushed property. This works great, the tab bar is "pushed" as the new view controller slides in place. The problem: When I pop this v...

iPhone: Weird space at the top of UINavigationController

I'm having a strange problem with adding a UINavigationController to my iPhone application. I add the controller as follows: myViewController *viewController = [[myViewController alloc] initWithNibName:@"myView" bundle:nil]; myNavigationViewController *navigationController = [[myNavigationViewController alloc] initWithRootViewControlle...

iPhone SDK: When running Object Alloc, GeneralBlock-0 show large number of net allocations?

I'm was running an iPhone application I'm working on through the Object Allocations performance tool, and I've noticed that "GeneralBlock-0 has a large (constantly growing) number of net allocations. Even so, the net and overall bytes for this group is consistently zero. Is this normal or does it indicate some a leak or memory manageme...

how to get around lack of 'add' button in ABPeoplePickerNavigationController?

My app needs to associate instances of a custom class with contact records in the iPhone's AddressBook. Everything's all well and good when I present the ABPeoplePickerNavigationController and allow the user to pick an existing contact. Problem is there's no obvious way to allow a user to easily ADD a contact record if the one they're lo...

Inserting an NSString into NSBundle's pathForResource?

This animates the UIImageView in the impactdrawarray: if ( ((impact *) [impactarray objectAtIndex:iv]).animframe == 70){ ((UIImageView *) [impactdrawarray objectAtIndex:iv]).image = [UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource:@"explosionA71" ...

Refreshing the UITableView from UITableViewCell

Is there an easy way to trigger a [UITableView reloadData] from within a UITableViewCell? I am loading remote images to be displayed after the initial table display, and updating the image with self.image = newImage does not refresh the table. Resetting the cell's text value does refresh the table, but this seems sloppy. MyTableViewCe...

Is there a better way to put a bunch of stuff in NSUserDefaults?

I'm confused about NSUserDefaults on the iPhone. I come from a C / asm background and the Objective-C stuff has been a learning experience. I'm currently using NSUserDefaults to store some strings (for the names in a highscore table). I want to start implementing a "Save Game" type feature so if the user gets a call or exits out of th...

iPhone: Can I get an image picker to have the documents folder as its source

It looks like I cant create an album for my picture producing app in the photo library... so what I was going to do is save the images to the documents folder for my app, which I think should be easy enough. The issue though is that the image picker seems to only allow you to pick saved images or photo library as the source, and I would...

Multiple Image Operations Crash iPhone App

I'm new to the iPhone App development so it's likely that I'm doing something wrong. Basically, I'm loading a bunch of images from the internet, and then cropping them. I managed to find examples of loading images asynchronous and adding them into views. I've managed to do that by adding an image with NSData, through a NSOperation, whic...

Core Data vs Sqlite and performance...

I am wondering if anyone has any real world numbers on performance differences between an old sqlite application which has been converted to Core Data in the 3.0 SDK. I suspect that under the hood Core Data is just using sqlite anyways and that it add's a bit of overhead for the cost of convenience, but i thought i would ask anyways. ...

Can you change the colors of the columns in UIPickerView?

Is it possible to change the color of columns in UIPickerView? For instance, in the standard date picker control, could the day column be green, month be red, and year be purple? Thanks! ...

How to "flick" a UIImageView?

I've got some UIViews that I'd like the user to be able to "flick" across the screen. They're not scroll views. They simply contain a raster image (png). Can anyone point me to some sample code, etc to help get me started? Something a little more heavyweight than "MoveMe" out there that helps detect a "flick" (vs a "nudge" or a drag and...

How to update view with UIButtons

I have buttons in my navigation bar and in a toolbar subview of a container view whose enabled property depends on app state. Currently the buttons are set in viewWillAppear, so the right thing happens if I navigate away from the view then return. I thought [containerView setNeedsDisplay] would do the trick, but no. (I have UITextViews ...

iPhone - How to build a list of unique items

I want an array which contains only unique items. I know I could do this with an NSDictionary adding items with keys and then get allKeys. This would ensure that the NSArray contains only unique items, but I feel that this would be overkill and believe that there should be an easier way to do this, but cannot find one. ...