This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool isLidClosed(void) | |
{ | |
bool isClosed = false; | |
io_registry_entry_t rootDomain; | |
mach_port_t masterPort; | |
CFTypeRef clamShellStateRef = NULL; | |
// Retrieve the IOKit's master port so a notification port can be created | |
IOReturn ioReturn = IOMasterPort(MACH_PORT_NULL, &masterPort); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "AirPrintingViewController.h" | |
@implementation AirPrintingViewController | |
-(void)printItem { | |
NSString *path = [[NSBundle mainBundle] pathForResource:@"demo" ofType:@"png"]; | |
NSData *dataFromPath = [NSData dataWithContentsOfFile:path]; | |
UIPrintInteractionController *printController = [UIPrintInteractionController sharedPrintController]; |
NewerOlder