September 2010
1 post
Twitter dev gems of September 2010
Goodies about Flash and iPhone development found through twitter during the last month.
How to cause an iPhone app to not go to background in iOS4
iPhone Pull to Refresh source code
Flash: BitmapData API additions
11 UI Kits for iPhone and iPad Development
Alternatives to Lorem Ipsum
March 2010
1 post
Crossdomain image loading hack
So about that little crossdomain image loading hack.
on the INIT event of your loader do the following:
var lInfo:LoaderInfo = e.target as LoaderInfo; var dO:DisplayObject; try{ dO = lInfo.content as DisplayObject; } catch(err:SecurityError){ var spt:Sprite = new Sprite(); spt.addChild(lInfo.loader); dO = spt; }
Courtesy of @michaelSvendsen
January 2010
2 posts
Finding http-links in NSString
Had some problem with long http links in a UIWebView so I created this simple function that finds links existing in a NSString and creates an a-tag with a “Read more” label. Suited my needs for the moment.
- (NSString *)parseLinks:(NSString *)html { NSScanner *theScanner; NSString *text = nil; theScanner = [NSScanner scannerWithString:html]; while ([theScanner...
NSUserDefaults
Want to store light information such as user defaults, current highscore fast and easy? Just use NSUserDefault.
Example: Adding the current highscore: [[NSUserDefaults standardUserDefaults] setInteger:scoreValue forKey:@"score"];
Example: Get the current highscore [[NSUserDefaults standardUserDefaults] integerForKey:@"score"]];
Except primitives it works for NSData, NSString, NSNumber,...
December 2009
1 post
Trying it
Trying out tumblr. Thinking this going to some sort of a iphone dev diary for me. Peace