Breaking News
Home / iOS / ObjectiveC (page 4)

ObjectiveC

How to generate VCard using ObjectiveC for iPhone?

Vcard is a pretty standard way for exchanging electronic business cards information. iPhone or any other smart phone supports VCard (.vcf) files and imports the contact details (firstname, lastname, email, phone, address etc.) into the Address book for that contact. The following snippets shows how to create a VCard as …

Read More »

How to url encode a NSString in Objective C?

Answer Encoding  parameters in query string or even the url path etc. is required otherwise the url become unusable. This can be achieved by using stringByAddingPercentEscapesUsingEncoding  method.     NSString *url = @"http://www.developerfeed.com/search.jsp?params=Java Developer";     NSString* encodedUrl =     [url stringByAddingPercentEscapesUsingEncoding:      NSASCIIStringEncoding];      NSLog(@"Encoded URL …

Read More »

How to get Retain Count of an Object in ObjectiveC?

Retain count helps to tell how many objects are holding this object. Simply sent the retainCount message to the object as show below. print  (int)[theObject retainCount] The release keyword reduces the retain count by 1.Remember the object gets destroyed by Run time when the retain count goes to 0. [pb_builder]

Read More »
Advertisment ad adsense adlogger