cocoa-touch

Custom UIView via UIActionSheet

Is it possible to modify a UIActionSheet with a custom UIView? I have a preferences cell in one of my tables which would benefit greatly from a modal window appearing with a UIDatePicker. Having it appear as an Alert would be fantastic as well. Ideally it would be nice to get the free animation that comes in play with UIActionSheet. Othe...

Is there any sample code to do iPhone mulitithreading tasks?

I have some slow internet task to save and load file, I'd like to do those slow tasks in some background thread. I am wondering whether that's doable, and if it is, any sample code? Then after it is finished, I'd like it to notice back to the main thread, so that I could update the UI. Thanks in advance. // Jack ...

getting this exception [CFURL release]: message sent to deallocated instance 0x1049530 when debugging iPhone application.

Hi, this is the code, which might be cause to generate this exception NSURL *justURL = [NSURL URLWithString:wJustUrl];//wJustUrl declared in constant file. //NSURL *justURL = [[NSURL alloc] initWithString:wJustUrl]; NSLog(@"%@",justURL); //self.justArray = [[NSArray alloc] initWithContentsOfURL:justURL]; self.justArray = [NSArray array...

Best Practices for implementing a modal Alert View using Cocoa Touch?

Does anyone have any best practices, tips & tricks, or recommendations for how to create modal Alert Views with Cocoa Touch? I like to think there is a way to make this difficult task trivial or at least easier. ...

How can I programmatically pause an NSTimer?

I'm using an NSTimer to do some rendering in an OpenGL based iPhone app. I have a modal dialog box that pops up and requests user input. While the user is providing input I'd like to "pause" i.e. something like this: [myNSTimer pause]; I'm using this syntax because I've been doing things like: [myNSTimer invalidate]; when I want ...

Is Object Releasing on Program Exit Really Needed?

I have a technical question. This is NOT a question about proper coding. My question is TECHNICALLY is releasing objects on a programs exit/close needed? In other words, lets say for the sake of argument, you have a button that closes your application, but right before you close you display a image, and then you close the application. ...

How do I refresh a table view after returning from a "detail view?"

Hi, I'm new to iPhone and Apple development and working on my first application. It simple with only a TableView and a "detail view" when an item in a table is selected. What I want to do is change the background color of the cell in the TableView based on some action taken in my "detail view". When the application initially loads I c...

UIView perspective transform

I'm looking to perform a perspective transform on a UIView (such as seen in coverflow) Does anyonew know if this is possible? I've investigated using CALayer and have run through all the pragmatic programmer Core Animation podcasts, but I'm still no clearer on how to create this kind of transform on an iPhone. Any help, pointers or e...

How can I receive a touch event?

I'd like to receive a touch event. Also I'd like some kind of coordinates indicating where the user touched the screen. How can I receive a touch event in an iPhone app? ...

Fitting a UIDatePicker into a UIActionSheet

I'm trying to get a UIDatePicker with a UIButton to show up in a UIActionSheet. Unfortunately it gets cropped off and the entire Date Picker is not visible. I have not even attempted to add the UIButton yet. Can anyone suggest on getting the entire view to fit properly? I'm not sure how to add the proper dimensions as UIActionSheet seems...

Child controller updating a label for a cell in parent table view

I have a navigation view with a cell that has something as simple as a Date of Birth. When that particular row is clicked, a new controller get pushed into view with a UIDatePicker. Once a new date is selected, I'd imagine I need to do something in viewWillDisappear: for that particular cell's UITextField value. What's the best way for m...

One Date Picker UIViewController for all Parent Controllers

Couldn't think of an intuitive way to paraphrase the topic for this question, and I apologize for that. My question is the following: I have several UIViewController's which need to call in a UIDatePicker. I didn't want to subclass the Date Picker several times as it's the same interface. The problem I'm having is figuring out what tool...

Possible to save an integer array using NSUserDefaults on iPhone?

Is it possible to save an integer array using NSUserDefaults on the iPhone? I have an array declared in my .h file as: int playfield[9][11] that gets filled with integers from a file and determines the layout of a game playfield. I want to be able to have several save slots where users can save their games. If I do: NSUserDefaults *p...

Clicking on UITextField in a UITableViewCell

I have an issue where when a textField is clicked on in a UITableView cell, the method tableView:didSelectRowAtIndexPath: does not get invoked. The problem is, I need to scroll my tableView into proper position, otherwise the keyboard goes right over the first responder. I have to then move code like this: [[self tableView] scrollToRow...

What's the difference between a CoreAnimation Layer Backed View and a Layer Hosting View?

What is the difference between a Layer Backed View and a Layer Hosting View in Core Animation? What are the steps to setting up each and when is it appropriate to use either type? ...

UITableViewController subclass won't load

I'm trying to show in the screen a table... Basically I create a custom UITableViewController with the methods needed for the UITableView delegate and data source which is self since UITableViewController does it for you. When I put it in the -initWithRootView: controller, and add the nav's bar view to the window it doesn't show! With ...

Creating a "chat bubble" on the iPhone, like Tweetie.

Just curious, did I overlook somewhere in the API to display a chat bubble type image as found in the iPhone's SMS application? There's a few applications out there that use bubbles that look verbatim to the iPhone's and I'm wondering if they're using a native widget or their own image. This is also seen in the Tweetie application where...

Which method when navigation bar "back" button clicked?

I am using UINavigationController to push and pop a view. I used [[self navigationController] pushViewController:myView animated:YES] to push in a view. Then I clicked the top-left back button to go back, I am getting error: *** -[NSCFDictionary superview]: unrecognized selector sent to instance 0x1451a0 *** Terminating app due to unc...

How to programatically highlight a UIButton?

I've had a lot of users complain that the little "i" info button is difficult to touch on the iPhone. Ok, simple enough -- I just stuck a big-fat invisible button behind it that you can't miss even with the sloppiest of finger touches and, when you touch it, it does the infoButtonAction. Thing is, I'd like to flash the info button, its...

Accessing iPhone WiFi Information via SDK

Is there a way using the iPhone SDK to get WiFi information? Things like Signal Strength, WiFi Channel and SSID are the main things I'm looking for. Only interested in Wifi info, not cellular. ...