objective-c

NSDictionary - Need to check whether dictionary contains key-value pair or not

Hello Every one. I just need to ask something as follow. Suppose I am having a dictionary. NSMutableDictionary *xyz=[[NSMutableDictionary alloc] init]; [xyz setValue:@"sagar" forKey:@"s"]; [xyz setValue:@"amit" forKey:@"a"]; [xyz setValue:@"nirav" forKey:@"n"]; [xyz setValue:@"abhishek" forKey:@"a"]; [xyz setValue:@"xrox" forKey:@"x"];...

Replica of file to Hashtable

Hello, Just before i had asked you about how to take input from file into hashtable by specifying key , i'm really sorry , actually i need to seperatly identify the key and value from text file and put it into my hashtable. i.e This is text file: LENOVA = Class_Name DELL = Class_Name WIPRO = Class_Name SAMSUNG = Class_Name Ineed to t...

Question about making a book like the contacts book on the iPad

For any of you out there who have had a chance to download the iPhone 3.2 sdk and play around with the simulator knows that one of the apps built in is a contacts book. When you open this app up it looks like a book, and has a nice user friendly way to edit and view contacts. So if I wanted to make an app that uses a similar format, mean...

How to change the color of the cursor in the textfield?

Hi guys, Here I am trying to change the color of the cursor in the Textfield. Guys please help me hoe to do this. Anyone's help will be appreciated. Thank you, Monish Kumar. ...

Core Data Saves and UI Performance

I'm wondering if there are any best practices for improving UI responsiveness while doing Core Data saves (not fetches) with large collections of managed objects. The app I'm working on needs to download fairly large amounts of data on set intervals from a web service until complete. On each interval, a batch of data is downloaded, f...

Understanding arrays in Objective-C / C

I just made my first steps moving into Objective-C. I have a very simple question about how arrays works. I have two .m files: 1) Line = origin[6]; forloop(i...i++) { origin[i]=7; } [buildSubview:origin]; 2) Line response[6]; -(id)buildSubview:(Line[])origin { *response=*origin; NSLog(@"response[1]=%o",response[1]); ...

mobile application analytics

HI all, so we all know "pinch media" - the "spyware" software ;) i'm searching for some really cool analytics softwares for my iphone application. pinch media, is the one i know, it looks really great, but we all know, the reputation of this piece of software is very bad. i'd like to know if i can use it, or if my app then is one of t...

sending data to remote server

Hi. I am building an application which will take data from user and send that data to a remote server. I want to know that is it necessary to create stub using the WSMakeStub. if yes, then how to create stub? How to use that stub into ur application If not, then how to send data to remote server? ...

Weird Error from Xcode Debugger

Hi there, I am using SQL lite database in my iPhone app. I have a refresh button on my Home screen and upon click of then refresh button I parse data from my web service and store the results into a SQL lite database. When I click on refresh button repeatedly I get an error. The error occurs after a variable number of clicks/refreshes e...

Download new app from within an iPhone-app

Hello, I have developed a game and are planning to make a "Lite" version of that game in order to promote the "Premium" version of the game. Information about how to make In-App-Purchase is easy to find. But what I cannot find is how to actually download the application from within my Lite-version, after the purchase. I do not intend to...

remove all UIButton's from subview

i'm programmatically adding a couple UIButtons to my view. After clicking one of the buttons they all should be 'removeFromSuperView' or released, not just one. for (int p=0; p<[array count]; p++) { button = [[UIButton alloc] initWithFrame:CGRectMake(100,100,44,44)]; button.tag = p; [button setBackgroundImage:[UIImage...

How to remove deletedObjects from ManagedObjectContext?

Hi, I have two enities: path <-->>> node. (one to many) In nodes ArrayController I override -DeleteObjects: to remove path if the last node is removed. Everything works perfect, but it's impossible to save edited document, because nodes are left in [ManagedObjectContext deletedObjcets]. It gives error on save. How to clean them up? Bab...

How to send and receive message through NSNotificationCenter in Objective-C?

Hi I need a simple example program to send and receive a message through NSNotificationCenter in Objective-C ??? ...

Releasing of strings

Hi guys, I got a doubt that when should the strings are released.I am not made any allocation to the string is there any necessary to release the string? Thank you, Monish Kumar. ...

What is the difference between window based and view based iphone apps ?

Hi, What is the difference between window based and view based iphone apps ? Thanks ...

Using a C function in Objective-C (for iPhone)

'lo all. I am a self-described admitted noob in iPhone programming (having a much longer perl & web background -- 30 years)...but took the plunge last week and bought a couple of good books. After cramming and reading well over 1000 pages -- and understanding it pretty well, I am well on my way to a good first Native iPhone app. My pro...

Use mapkit to calculate distance between two addresses ?

Hi Is it possible to use the mapkit in the iphone sdk to calculate distance between two addresses ? Thanks for the help. ...

How should I deal with the need for multiple callbacks for the same delegate in Objective-C?

I have created a library which can download JSON data which is then placed into an NSDictionary. I wrap this class with a simple Twitter engine which allows me to pull my friends timeline, post an update and post an update with my GPS location. From my limited experience with Objective-C the way to connect everything is with delegation. ...

Saving application data state on exit

I have an NSMutableArray with 24 strings. I need to save this data if a user gets a call or quits the application. I have been looking into many examples but for some reason can’t seem to determine the best way to save the data. The 24 strings correspond to 24 buttons and their state. When a button is clicked, it displays the corr...

Getting the Current font of a NSTextView.

How would I get the current font of an NSTextView? ...