Disable sleeping

by alex 28. December 2009 15:48

[UIApplication sharedApplication].idleTimerDisabled = YES;

How to terminate an application

by alex 15. May 2009 09:58

//But you need to understand that this is against "iPhone Human Interface Guidelines"

exit(0);


Get screen/application/status bar frame dimensions

by alex 30. April 2009 14:47

CGRect rect;

// Get screen dimensions

rect = [[UIScreen mainScreen] bounds];

NSLog(@"Bounds: %1.0f, %1.0f, %1.0f, %1.0f", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);

// Get application frame dimensions (basically screen - status bar)

rect = [[UIScreen mainScreen] applicationFrame];

NSLog(@"App Frame: %1.0f, %1.0f, %1.0f, %1.0f", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);

// Get status bar frame dimensions

rect = [[UIApplication sharedApplication] statusBarFrame];

NSLog(@"Statusbar frame: %1.0f, %1.0f, %1.0f, %1.0f", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);


Make a phone call from runtime

by alex 10. March 2009 09:05

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:1-800-111-1111"]];

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen