Browsing articles tagged with " ios5"
Nov
21
2011

JSON in ios 5

json_file

Before ios 5, we have to use third party JSON library like SBJSON or TouchJson to deal with JSON data. Today, iOS 5 has built-in APIs in the Foundation Framework which is called the NSJSONSerialization to make it easy to read and write JSON. Click here for reference. Below is an example of how to read JSON data into NSArray, NSDictionary and NSString. NSString* str= @"{\"name\":\"cayden\",\"hobby\":[{\"0\":\"programming\"}, {\"1\":\"gym\"}]}"; NSData* data=[str dataUsingEncoding:NSASCIIStringEncoding];   NSError* error; NSDictionary* json [...]

Nov
20
2011

Twitter framework for ios5

ios5-tweet

In this post i’ll walkthrough how to implement the ios5 Twitter framework in your app. The first thing we need to do is of course import the new Twitter Framework and the Account Framework into our project. In Xcode, tap on the project, under ‘Build Phases’, add the two frameworks needed. To use the framework, we will import them into our controller like this: #import <Twitter/Twitter.h> #import <Accounts/Accounts.h> In this demo, i’ll just create a [...]

Nov
15
2011

Turn Off Automatic Reference Counting For IOS5

automatic-reference-counting

Automatic Reference Counting (ARC) for Objective-C makes memory management the job of the compiler. By enabling ARC with the new Apple LLVM compiler, you will never need to type retain or release again, dramatically simplifying the development process, while reducing crashes and memory leaks. The compiler has a complete understanding of your objects, and releases each object the instant it is no longer used, so apps run as fast as ever, with predictable, smooth performance. [...]

Ads

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Facebook Page

Categories