Archive for the ‘Objective-C’ Category

4 Steps to Change X-code Project Version

May 14, 2013 Leave a comment

After updating your projects, you may want to give it a new version number. Here are four steps of how to change it:

Step 0: Click the target — you can see your current version name (Opencv Tutorial)





Step 1: (slowly)Double Click the name(in blue), you will be able to change the name (Opencv Tutorial1.1)




Step 2: Now add a new scheme






Step 3: X-code should already automatically detect the changes, so simply click OK. You are done Now:)



Categories: MacOS, Objective-C

Fix UIActionSheet Cancel Button

May 22, 2012 Leave a comment

I found that using the UIActionSheet, it seems that the “Cancel” button does not function well. It turns out to be a normal problem, where here gives the right answer. I followed the instruction and changed the code (self — is the


[self.actionSheet showInView:self.view]; // show from our table view (pops up in the middle of the table)


[self.actionSheet showInView:self.parentViewController.tabBarController.view];

Categories: MacOS, Objective-C, Programming

ios Image Proc

May 22, 2012 Leave a comment

Well opencv is a good thing, but sometimes really hard to do the configuration. Depends on your purposed, if just for simple image processing, there are actually several example codes where you can learn from .

1) GLImageprocessing by Apple




Categories: MacOS, Objective-C

Make Rating Bar in Objective-C

April 19, 2012 Leave a comment
Instead of calling Google API to get the status shown on the meterbar, like this:
You can also use the NSLevelIndicator Class
Here’s several links:
Here’s an example creating start-rating:

I also find an overstack answer for the fancy bar that I have been looking for for a long time:

Categories: Objective-C

An objc image processing package

April 17, 2012 Leave a comment

Here’s one that objective-C based image processing package.

Using Google Chart in Objective-C

April 14, 2012 1 comment

Google chart is a very nice tool where you can generate some very nice figures for your data. By calling their API, you could simply embed it into your web page or download the image for whatever you use. At their website, google includes some most commonly used ones, but some are missing such as meter bar. You could probably find others that fit your goal by just ‘googling’ 🙂

Here’s a code snip for how to use it in Objective-C. I use chf=bg,s,65432100 to make it a clear/transparent background.

- (UIImage *) getGoogleChartImage {

NSString* url=@",40&chs=250x100&chl=Hello|World&chf=bg,s,65432100";
NSString *myurl=[url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

NSMutableURLRequest *theRequest=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:myurl] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];

NSURLResponse* response;
NSError* error;
NSData *googleImageData=[NSURLConnection sendSynchronousRequest:theRequest returningResponse:&response error:&error];


UIImage *googleImage = [[UIImage alloc] initWithData:googleImageData];
NSLog(@"Retrived Google Image Width: %f", googleImage.size.width);

return googleImage;