cocoa-touch

Problem in copying data of one NSDictionary to another

Hello i am having problem in copying data from one NSDictionary to another i used the [dicForFoodproduct_fromWeb initWithDictionary:dictforfoodproduct]; Here it terminates and says "unrecognized selecter sent to the instance..." I am getting 5 key values in dictForFoodProduct but am unable to copy that key values into dicForFoodProduc...

Getting the bounding selection rectangle of UIWebView

How do we get the on-screen location of a selection in UIWebView? That is whenever the user selects some text and the system displays the selection box, I want to know what is the bounding coordinate of the rectangle in screen (or view) units. The reason for this that I want to display a UIPopoverController that has an arrow pointing to...

NSMutableArray vs. NSDictionary for a table view

I have a table view that is populated by objects in an array. I want to give the user the option to delete table entries. I was wondering if it would be easier if I used NSDictionary instead of NSMutableArray? How do you know when to use NSDictionary instead of NSMutableArray? ...

How to approximate processing time?

It's common to see messages like "Installation will take 10 min aprox." , etc in desktop applications. So, I wonder how can I calculate an approximate of how much time a certain process will take. Off course I won't install anything but I want to update some internal data and depending on the user usage this might take some time. Is thi...

Is it possible to call alert "Allow to use current location" manually?

Is it possible to call alert "Allow to use current location" manually when using CoreLocation framework? ...

NSMutableArray arrayWithArray: vs. initWithArray:

These both work in my app without any noticeable difference: 1) theArray = [[NSMutableArray alloc] initWithArray:[NSKeyedUnarchiver unarchiveObjectWithData:theData]]; 2) theArray = [NSMutableArray arrayWithArray:[NSKeyedUnarchiver unarchiveObjectWithData:theData]]; [theArray retain]; However, are they really equivalent? (1) has an...

UITextView in a UITableViewCell smooth auto-resize

Hi everyone, I have a UITextView in a UITableViewCell contentview and allow the cell to autoresize so that the entered text is fully shown - what I am trying to accomplish is an autoresizing cell like the native iOS4 Contacts app has, when you enter "notes" for contact - i.e. when the contentSize of the textView changes - I call reloadRo...

How to check if an object is nil

I made a Class that has several NSStrings as properties. If I have an object of this class, then how can I know if the object is nil (i.e. all the NSString properties are nil). My class looks like this // MyClass.h #import <Foundation/Foundation.h> @interface MyClass : NSObject <NSCoding> { NSString *string1; NSString *string2; }...

problem in adding uiactivity indicator in uitableview controller

Hi i am not able to add uiactivity indicator in uitableview controller, can someone help me out I am having a table view controller now on click event of cell in table i want to display activity indicator because on click event of cell it takes 3 to 4 second of processing , so i want to display activity indicator at that time but whe...

How to add a navigation bar to a UITableView

I added a subview to my application. The view controller is a UITableViewController. When I open the .xib file I see the table, but I can't drag a navigation bar onto it. So once the user enters the view, they have no way of getting back to the previous screen. What can be done? ...

How to add a navigationController to a view-based application

Is it possible to add a navigationController to a view application that inherits from UIViewController and not UITableViewController? How is it done? ...

Connecting UIViewControllers with a image using touchesBegan

Hi, I got a MainViewController who has addes a SubViewController. In the SubViewController there another SubSubViewController who has image inside witch will be clicked sometimes. When touchesBegan dispatch the delegate of SubSubViewController is getting called. Now i need this. [mainViewController method] inside the SubSubViewContr...

Using Kal calendar without doing the initialization (and so on) in the AppDelegate

I'm using the Kal calendar. For the code shown below I'm referring to the Holiday example. In this example the allocation and initialization of Kal is done in the applicationDidFinishLaunching in the AppDelegate. The UITableViewDelegate protocol (e.g. didSelectRowAtIndexPath) is also positioned in the AppDelegate class. The AppDelegate:...

questions to scifihifi-iphone project for using the apple keychain

The scifihifi-iphone project is a wrapper for the Apple Keychain. But it not documented enough. For which iphone OS is this made? iOS 3? What does the "UI" group do? Do I need this? How to use it? Thanks in advance! ...

MKAnnotationView image property

Hi all I have an annotationview (draggable property is set to YES) with a cutstom image, set via the image property. When the annotation is added to the map it has the custom image. But the image turns back to the default pin when the annotation is dragged. I also tried to overwrite the image propery everytime the dragstate changes. N...

How to make a tab bar application from scratch

How do you make a tab bar application from scratch, using Interface Builder? Is there a tutorial that shows how to do this? So far I've figured out that you need to start with a Windows-based application. Then do you open MainWindow.xib and add the tab bar controller there? ...

Why does my iPhone App remember its UI state partially?

I have made a small test app with a button and a UISlider. Touching the button changes its label text. I have added IBOutlet properties for both controls. I'm releasing all properties in viewDidUnload and also set them to nil in dealloc. The interesting thing is now: I touch the button. Its tag is changed from "0" to "1" and, its text i...

Make UIAlertView blocking

Hello, I need make UIAlertView blocking. Because i have function and i need to return UIAlertView choice. But problem is that after UIAlertView is shown my function code is executing further so i can't catch UIAlertView choice (i can do it in delegate methods, but i need to return function result). I tried to make UIAlertVIew blocking ...

UILabel Setting Transparent Background Color?

I am looking to add a black label with a transparent background to my view (see below) // ADD LABEL UILabel *label = [[UILabel alloc] init]; [label setFrame:CGRectMake(124, 312, 72, 35)]; [label setText:@"Yay!"]; [label setTextAlignment:UITextAlignmentCenter]; [[self view] addSubview:label]; [label release]; When I add the label it al...

sectionNameKeyPath through multiple relationships

Hello all, I am working on an app that uses Core Data and an NSFetchedResultsController. The model setup is like this: /-----------\ /-----------\ /-----------\ |Part | |Kit | |Source | |-----------| |-----------| |-----------| |name | |name | ...