cocoa-touch

When do you make an underscore in front of an instance variable?

I've seen this at Apple, inside UIPickerView.h: id<UIPickerViewDataSource> _dataSource; why's that underscore there? Does it have a special meaning? A Convention I must know about? ...

iPhone 2.2.1 to 3.0 Transition Best Practices

Apple is now requiring app developers to submit apps that target 2.2.1 but also build for 3.0. I (and I imagine a large majority of small/part-time developers) only have one iPhone and since the upgrade to 3.0 is irreversible, I wanted to get some thoughts out there as to what are some best practices for minimizing risk during the transi...

What does this line of code mean?

Hey, What does this line of code mean? I do not understand it - (IBAction)edit { self.editingViewController.movie = self.movie; // I dont understand this line [self presentModalViewController:self.editingViewController animated:YES]; } And what about this? - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:ani...

ICMP and the iPhone SDK

I'm looking to implement a Ping class in Cocoa-Touch. From the googling I have done and old c code I have looked at, it seems using the ICMP protocol is the best way to go. I guess my question is, is ICMP supported in the iPhone SDK, and if not, is there anything in the CoreFoundation Network classes I could use instead? I have had a lo...

How do I add a UIButton or UISwitch in tableView:viewForFooterInSection

Hello. I'm trying to understand how to add a label with a UISwitch or other controller to a footer (or header) in a sectioned tableView. Any help would be greatly appreciated. Thank you in advance! ...

iPhone how to suppress phone dialer screen

Hi, I am writing an application which dials a phone number using the "tel" protocol. While dialing the standard iPhone dialer screen pops up. Is there any means by which this screen can be suppressed? Or make this screen device orientation aware? ...

barcode framework for the iphone?

Is there already a barcode framework for the iphone? ...

Detecting finger touch on text

Hi All, I want to read the string displayed on the screen with finger touch, means as my finger moves over the text displayed on screen, the text below the finger should get highlighted. Is there any way to do this using UITextView or any other class. Also i want to play the sound associated with that word from a sound file which has t...

iPhone multiple NSTimer problem

I am writing a multithreaded iphone application in which the socket operations take place at the backend. The front end is the user interface. My problem is that the NSTimer is working only at the front end. That too only one timer works on the frontend. Unable to implement NSTimers at the backend? Are there any threading issues involved...

How can I rotate a UIImageView with respect to any point (other than its center)?

By default, a UIImageView will rotate only about its center. How do I get it to rotate about any other point in the image? ...

How would you implement a dataSource object for an UIScrollView?

Tell me if I am wrong with that: I made an new class ScrollViewDataSource. That class conforms to an protocol I created within my delegate for the scroll view. Well, it's a very special delegate that does some very complex stuff upon scrolling. So this delegate receives that data source object upon initialization. The datasource object ...

UIView is not being displayed

Hi, In my app I have a view controller that has its own navigation controller. But sometimes I need to call it from another navigation controller. When I do so everything is fine but when I want to open a view controller from its own navigation controller again, the view itself is not being displayed. viewWillAppear method of a view con...

Set UIImage of a new view and display it

Hi, I'm trying to set the image of a new view. I set the controller's image an then display the view. But in the controller's viewDidLoad, no image is available. - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo { EditPictureSaveViewController...

What's the name of the object, that has an delegate?

The delegate is something like the dog from the "master". I'm thinking about the name for an important instance variable that has to hold a weak reference to this "master" of the delegate. Is there any official name for this? ...

Calendar control for cocoa touch

I'm want to create a CRM app for me just for fun and to learn more about Cocoa, because CRM application evolve based on a Calendar, I wonder where can I get that cool Calendar control that iCal has in the iPhone. I can't see it in my Library and I'm using SDK 3.0 beta 5. And by the way, where can I get a free/paid controls collection l...

What sort function is used in NSArray?

This is really a three-part question, but I've answered the first question myself: I'm working on the iPhone, with many objects (up to 200) on the screen. Each object needs to look if it's overlapping other objects, and act accordingly. My original naive implementation was for each object to run through the list of each other object t...

What does the error message "No provisioned iPhone OS device is connected." mean?

Yesterday I testet a lot on my device. Suddenly I get this error message when I hit Build & Go in Xcode. First, it asks me if it's ok to sign with my key. I click yes, and then that error message appears. My iPod is connected as usual, iTunes starts automatically and I close that to prevent interruptions. I tried restarting Xcode. Doesn...

nonatomic property in an NSOperation object (threaded environment), when to use it?

I'm still getting the hang of working in a threaded environment using NSOperation, and I'm interested in understand if using the 'nonatomic' property is even worthwhile if you're subclassing NSOperation? If your defaultQueue is set to 1, is the additional overhead of nonatomic worth it? Might it be needed if you're executing more than 1...

Is there a gallery of reusable iPhone components on the web?

There are quite a few reusable iPhone solutions/tricks on the web, mostly scattered on various blogs. However I could not find any single place where they would be collected together (something like what MacUpdate/VersionTracker is to applications). Is there such a site already? If not, I'm thinking to create one. What components would...

Do I have to run the delegate of an UIScrollView in another thread to prevent performance problems during scrolling?

I'm going to do some sophisticated things in the delegate's methods during scrolling. I'll also implement the dynamic preloading of contents, so that it's theoretically possible to scroll through a few hundret thousand images. But I fear, that every time I do the preloading action for the next big chunk in scrolling direction, the delega...