Thursday 10 January 2013

Network JSON request in iOS


I had to dig a little to bring all the components together necessary for something like this so I thought it best to document it.

For the request you need: 

1. Create an NSMutableRequest
2. Create an NSURLConnection with the above request
3. Set the class encapsulating this behavior as the delegate to the connection
4. Implement the call back methods the connection makes based on the result it gets (so you can decide what to do)

No comments:

Post a Comment