• 2013-05-01

    Tovi – Total Image Viewer for Mac OS X, GIF, PNG, SVG, JPG…

    Views: 9898 | No Comments

    Tovi is the total image viewer and slideshow for Mac OS X, supports many types of image format, including GIF animation, PNG, SVG, JPG, TIFF…

    Tovi co-operates well with Mac OS X Finder, automatically generates slideshow when you open images from Finder. Tovi plays images in a clean and simple look and feel.

    Tovi provides very carefully designed keyboard shortcuts to operate on images, such as scale, rotate, prev/next slide, auto play slideshow, etc…

    If you like to open images from Finder, Tovi this the replacement for Preview, for it can play GIF animation, auto discover other images in the same folder(which Preview can’t).

    Ease keyboard shortcuts:

    Left/Right Arrow: Previouse/Next image in the same folder
    SHIFT + Left/Right: Rotate image


    Try a web version.

    Posted by ideawu at 2013-05-01 15:36:45 Tags:
  • 2013-04-17

    What the hell is Apple website “Your session has timed out”!

    Views: 4405 | No Comments

    Can not log in with my Apple ID, always get an “Your session has timed out.” error message.

    Could not submit a feedback, the page https://developer.apple.com/contact/submit.php didn’t redirect properly!

    Apple, you should do better!

    Posted by ideawu at 2013-04-17 11:39:58
  • 2013-04-14

    Cocoa Objective-C JSON encode and decode

    Views: 8873 | No Comments

    KISS – Keep It Simple, Stupid!

    The NSJSONSerialization limited top level objects to NSArray and NSDcitionary, but with this tool, you can encode primative objects, such as integer, float, string, array, dictionary to JSON string, and vice verse.

    You can decode the json string contains only string to Objective-C object, like "a" to an NSString, and it works for numbers, 123 will decode to NSNumber.

    #import <Foundation/Foundation.h>
    NSString *json_encode(id obj){
    	BOOL is_primative = false;
    	if(![obj isKindOfClass:[NSArray class]] && ![obj isKindOfClass:[NSDictionary class]]){
    		is_primative = true;
    		obj = [NSArray arrayWithObject: obj];
    	id data = [NSJSONSerialization dataWithJSONObject:obj options:0 error:nil];
    	NSError *err = nil;
    	NSString *str = [[NSString alloc] initWithData:data encoding:[NSString defaultCStringEncoding]];
    		return nil;
    		str = [str substringWithRange:NSMakeRange(1, [str length]-2)];
    	return str;
    id json_decode(NSString *str){
    	str = [str stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
    	BOOL is_primative = false;
    	unichar ch = [str characterAtIndex:0];
    	if(ch == '"' || (ch != '[' && ch != '{')){
    		is_primative = true;
    		str = [NSString stringWithFormat:@"[%@]", str, nil];
    	NSData* data = [str dataUsingEncoding:[NSString defaultCStringEncoding]];
    	NSError *err = nil;
    	id obj = [NSJSONSerialization JSONObjectWithData:data options:0 error:&err];
    		return nil;
    		obj = [obj objectAtIndex: 0];
    	return obj;
    int main(int argc, char **argv){
    	NSArray *arr = [NSArray arrayWithObjects: @"a", @"b", nil];
    	NSLog(@"%@", json_encode(@"abc"));
    	NSLog(@"%@", json_encode(arr));
    	NSLog(@"%@", json_decode(@"[1, 2, \"abc\"]"));
    	NSLog(@"%@", json_decode(@"\"abc\""));
    	NSLog(@"%@", json_decode(@"\"%\""));
    	return 0;

    A bunch of simpler Objective-C classes and functions(Standard Objective C Library): https://github.com/ideawu/soc

    Posted by ideawu at 2013-04-14 14:38:47
  • 2013-04-08

    Mac convert SVG to PNG

    Views: 4165 | No Comments
    qlmanage -t -s 512 -o ./output_dir file.svg

    -s: size in pixel
    -o: ouput dir

    Posted by ideawu at 2013-04-08 18:03:27
  • 2013-04-07

    How to deal with Xcode “Code Sign error”

    Views: 8543 | No Comments

    I happend to run into the situation that my project cannot compile and run, after I checked the “Entitlements” option. The error message is:

    "Check dependencies
    Code Sign error: The identity 'Mac Developer' doesn't match any valid, non-expired certificate/private key pair in the default keychain"

    I just to go to the old way to test my App, so I seek for the solution. Here is how I get rid of this error:

    1. Click on you project name from “Project Navigator”
    2. Select item under “Targets” that lies beside “Project Navigator”
    3. Then click on the “Build Settings” tab
    4. Set the option “Code Signing Identity” to “Don’t Code Sign”
    Posted by ideawu at 2013-04-07 22:42:20 Tags:
|<<<123>>>| 2/3 Pages, 11 Results.