Browsing articles in "IOS"
Nov
25
2011

Edit Xcode 4 Project’s Organization Name

xcode-organization-name

Some people that are new to Xcode 4 are still wondering how to change the default organization name under the copyright text. Before Xcode 4, what you can do is something like: defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions ‘{"ORGANIZATIONNAME" = “{Company Name}";}’ , or update the Xcode template file. With Xcode 4, here’s a quick one. Select your project, on the right pane, under ‘File Inspector->Project Document’, you’ll see an ‘Organization’ field. Just fill in your company [...]

Nov
23
2011

Working with delegate in objective-c

delegation

Base on the explanation in Apple Developer Documentation, delegation is a simple and powerful pattern in which one object in a program acts on behalf of, or in coordination with, another object. The delegating object keeps a reference to the other object—the delegate—and at the appropriate time sends a message to it. The message informs the delegate of an event that the delegating object is about to handle or has just handled. The delegate may [...]

Nov
22
2011

Parsing CSV to Objective-C with CHCSVParser

csv_file

Ever thought of how to import your excel data into iphone project? You can do it with CSV parser. CHCSVParser is an Objective-C parser for CSV files. It is very useful if you would like to import your data from excel file, you can save your excel to CSV format and import them into objective-c. The source can be downloaded from github here. To use this library, in your controller, you need to import the [...]

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

IOS & Mac OS Communication with AsyncSocket

AsyncSocket is an asynchronous socket networking library for Cocoa. Using this library, I’ve created a client with is an iPhone app and the server (or remote host) which is a Mac app. The video below shows a demo of socket communication between the iPhone and Mac app. You may download the source code from my github.

Pages:«1234»

Ads

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

Facebook Page

Categories