Monday, January 14, 2013
clang: error: unable to execute command: posix_spawn failed: Resource temporarily unavailable
Too many processes - restarting fixes.
Sunday, January 13, 2013
Convert Storyboard from iPhone to iPad
This posting saved me a lot of time when creating an iPhone app from an existing iPad app. The comments contain useful info too.
UIImage imageNamed does not resolve device based names when the image name contains a period.
UIImage imageNamed does not resolve device based names when the image name contains a period.
Given an image named "ab~ipad.png" [UIImage imageNamed:@"ab"] WORKS
Given an image named "ab~ipad.png" [UIImage imageNamed:@"ab"] WORKS
Given an image named "a.b~ipad.png" [UIImage imageNamed:@"a.b"] RETURNS NULL
Saturday, December 29, 2012
UIView to UIImage
A simple way to capture a UIView in a UIImage or PDF.
Import CaptureView.h/.m
For an image screenshot:
Import CaptureView.h/.m
For an image screenshot:
UIImage* screenshotImage = [CaptureView viewToImage:self.view];
For a PDF screenshot:
NSData* pdfData = [CaptureView viewToPdf:self.view];
Primitive values with NSArray & NSDictionary
NSArray+Primitive
NSArray+Primitive extends NSArray and NSMutableArray to provide support for primitives
BOOL, char, int, float, CGPoint, CGSize, CGRect. The following example demonstrates int but all the other types work the same way.NSMutableArray* array = [NSMutableArray array]; [array addInt:1]; // array = [1] [array addInt:2]; // array = [1, 2] int i = [array intAtIndex:0]; // i = 1 [array swapIndex1:0 index2:1]; // array = [2, 1] [array replaceIntAtIndex:0 withInt:3]; // array = [3, 1] [array insertInt:4 atIndex:1]; NSLog(@"%@", [array description]); // console shows [3, 4, 1]
NSDictionary+Primitive
NSDictionary+Primitive extends NSDictionary and NSMutableDictionary to provide support for primitives
BOOL, char, int, float, CGPoint, CGSize, CGRect. The following example demonstrates int but all the other types work the same way.NSMutableDictionary* dict = [NSMutableDictionary dictionary]; [dict setInt:1 forKey:@"int1"]; // dict = { int1:1 } [dict setInt:2 forKey:@"int2"]; // dict = { int1:1, int2:2 } int i = [dict intForKey:@"int1"]; // i = 1 NSLog(@"%@", [dict description]); // console shows { int1 = 1; int2 = 2; }
Sunday, June 17, 2012
UIFont properties
This is the most useful illustration I've found describing UIFont properties. Full article.
Tuesday, May 15, 2012
Hold For Developer Release
When creating a new version of an app there is an option to release the app after it's approved or hold it for the developer to release. I'm not aware of a way to modify this setting after the version has been created, so it's probably a good idea to always choose hold for developer release. Apps being submitted for the first time do not have this option and the work around appears to be to set the apps availability date to some time in the future in Rights And Pricing.
Update: Confirmed that setting availability date on a new app will hold it from the store release. The gotcha is the app position in iTunes "New" list appears to be based on approval date, so the longer you wait the less time your app shows in "New".
Update: Confirmed that setting availability date on a new app will hold it from the store release. The gotcha is the app position in iTunes "New" list appears to be based on approval date, so the longer you wait the less time your app shows in "New".
Subscribe to:
Posts (Atom)