[
  {
    "path": ".gitignore",
    "content": "# Xcode\n.DS_Store\nbuild/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\n*.xcworkspace\n!default.xcworkspace\nxcuserdata\nprofile\n*.moved-aside\nDerivedData\n.idea/\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2012 kishikawa katsumi (http://kishikawakatsumi.com/)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE."
  },
  {
    "path": "Lib/SRScreenRecorder.h",
    "content": "//\n//  SRScreenRecorder.h\n//  ScreenRecorder\n//\n//  Created by kishikawa katsumi on 2012/12/26.\n//  Copyright (c) 2012年 kishikawa katsumi. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import <AVFoundation/AVFoundation.h>\n#import <TargetConditionals.h>\n\ntypedef NSString *(^SRScreenRecorderOutputFilenameBlock)(void);\n\n@interface SRScreenRecorder : NSObject\n\n@property (retain, nonatomic, readonly) UIWindow *window; // A window to be recorded.\n@property (assign, nonatomic) NSInteger frameInterval;\n@property (assign, nonatomic) NSUInteger autosaveDuration; // in second, default value is 600 (10 minutes).\n@property (assign, nonatomic) BOOL showsTouchPointer;\n@property (copy, nonatomic) SRScreenRecorderOutputFilenameBlock filenameBlock;\n\n- (instancetype)initWithWindow:(UIWindow *)window;\n\n- (void)startRecording;\n- (void)stopRecording;\n\n@end\n"
  },
  {
    "path": "Lib/SRScreenRecorder.m",
    "content": "//\n//  SRScreenRecorder.m\n//  ScreenRecorder\n//\n//  Created by kishikawa katsumi on 2012/12/26.\n//  Copyright (c) 2012年 kishikawa katsumi. All rights reserved.\n//\n\n#import \"SRScreenRecorder.h\"\n#import \"KTouchPointerWindow.h\"\n\n#ifndef APPSTORE_SAFE\n#define APPSTORE_SAFE 0\n#endif\n\n#define DEFAULT_FRAME_INTERVAL 2\n#define DEFAULT_AUTOSAVE_DURATION 600\n#define TIME_SCALE 600\n\nstatic NSInteger counter;\n\n#if !APPSTORE_SAFE\nCGImageRef UICreateCGImageFromIOSurface(CFTypeRef surface);\n#ifndef __IPHONE_11_0\nCVReturn CVPixelBufferCreateWithIOSurface(\n                                          CFAllocatorRef allocator,\n                                          CFTypeRef surface,\n                                          CFDictionaryRef pixelBufferAttributes,\n                                          CVPixelBufferRef *pixelBufferOut);\n#endif\n\n@interface UIWindow (ScreenRecorder)\n+ (IOSurfaceRef)createScreenIOSurface;\n+ (IOSurfaceRef)createIOSurfaceFromScreen:(UIScreen *)screen;\n- (IOSurfaceRef)createIOSurface;\n- (IOSurfaceRef)createIOSurfaceWithFrame:(CGRect)frame;\n@end\n#endif\n\n@interface SRScreenRecorder ()\n\n@property (strong, nonatomic) AVAssetWriter *writer;\n@property (strong, nonatomic) AVAssetWriterInput *writerInput;\n@property (strong, nonatomic) AVAssetWriterInputPixelBufferAdaptor *writerInputPixelBufferAdaptor;\n@property (strong, nonatomic) CADisplayLink *displayLink;\n\n@end\n\n@implementation SRScreenRecorder {\n\tCFAbsoluteTime firstFrameTime;\n    CFTimeInterval startTimestamp;\n    BOOL shouldRestart;\n    \n    dispatch_queue_t queue;\n    UIBackgroundTaskIdentifier backgroundTask;\n}\n\n- (instancetype)initWithWindow:(UIWindow *)window\n{\n    self = [super init];\n    if (self) {\n        _window = window;\n        _frameInterval = DEFAULT_FRAME_INTERVAL;\n        _autosaveDuration = DEFAULT_AUTOSAVE_DURATION;\n        _showsTouchPointer = YES;\n\n        counter++;\n        NSString *label = [NSString stringWithFormat:@\"com.kishikawakatsumi.screen_recorder-%@\", @(counter)];\n        queue = dispatch_queue_create([label cStringUsingEncoding:NSUTF8StringEncoding], NULL);\n\n        [self setupNotifications];\n    }\n    return self;\n}\n\n- (void)dealloc\n{\n    [[NSNotificationCenter defaultCenter] removeObserver:self];\n    [self stopRecording];\n}\n\n#pragma mark Setup\n\n- (void)setupAssetWriterWithURL:(NSURL *)outputURL\n{\n    NSError *error = nil;\n    \n    self.writer = [[AVAssetWriter alloc] initWithURL:outputURL fileType:AVFileTypeQuickTimeMovie error:&error];\n    NSParameterAssert(self.writer);\n    if (error) {\n        NSLog(@\"Error: %@\", [error localizedDescription]);\n    }\n    \n    UIScreen *mainScreen = [UIScreen mainScreen];\n#if APPSTORE_SAFE\n    CGSize size = mainScreen.bounds.size;\n#else\n    CGRect nativeBounds = [mainScreen nativeBounds];\n    CGSize size = nativeBounds.size;\n#endif\n    \n    NSDictionary *outputSettings = @{AVVideoCodecKey : AVVideoCodecH264, AVVideoWidthKey : @(size.width), AVVideoHeightKey : @(size.height)};\n    self.writerInput = [AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo outputSettings:outputSettings];\n\tself.writerInput.expectsMediaDataInRealTime = YES;\n    \n    NSDictionary *sourcePixelBufferAttributes = @{(NSString *)kCVPixelBufferPixelFormatTypeKey : @(kCVPixelFormatType_32ARGB)};\n    self.writerInputPixelBufferAdaptor = [AVAssetWriterInputPixelBufferAdaptor assetWriterInputPixelBufferAdaptorWithAssetWriterInput:self.writerInput\n                                                                                                          sourcePixelBufferAttributes:sourcePixelBufferAttributes];\n    NSParameterAssert(self.writerInput);\n    NSParameterAssert([self.writer canAddInput:self.writerInput]);\n    \n    [self.writer addInput:self.writerInput];\n    \n\tfirstFrameTime = CFAbsoluteTimeGetCurrent();\n    \n    [self.writer startWriting];\n    [self.writer startSessionAtSourceTime:kCMTimeZero];\n}\n\n- (void)setupTouchPointer\n{\n    if (self.showsTouchPointer) {\n        KTouchPointerWindowInstall();\n    } else {\n        KTouchPointerWindowUninstall();\n    }\n}\n\n- (void)setupNotifications\n{\n    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];\n    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillEnterForeground:) name:UIApplicationWillEnterForegroundNotification object:nil];\n}\n\n- (void)setupTimer\n{\n    self.displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(captureFrame:)];\n    self.displayLink.frameInterval = self.frameInterval;\n    [self.displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];\n}\n\n#pragma mark Recording\n\n- (void)startRecording\n{\n    [self setupAssetWriterWithURL:[self outputFileURL]];\n    \n    [self setupTouchPointer];\n    \n    [self setupTimer];\n}\n\n- (void)stopRecording\n{\n    [self.displayLink invalidate];\n    startTimestamp = 0.0;\n    \n    dispatch_async(queue, ^{\n        if (self.writer.status != AVAssetWriterStatusCompleted && self.writer.status != AVAssetWriterStatusUnknown) {\n            [self.writerInput markAsFinished];\n        }\n        [self.writer finishWritingWithCompletionHandler:^\n         {\n             [self finishBackgroundTask];\n             [self restartRecordingIfNeeded];\n         }];\n    });\n}\n\n- (void)restartRecordingIfNeeded\n{\n    if (shouldRestart) {\n        shouldRestart = NO;\n        dispatch_async(queue, ^{\n            dispatch_async(dispatch_get_main_queue(), ^\n                           {\n                               [self startRecording];\n                           });\n        });\n    }\n}\n\n- (void)rotateFile\n{\n    shouldRestart = YES;\n    dispatch_async(queue, ^{\n        [self stopRecording];\n    });\n}\n\n- (void)captureFrame:(CADisplayLink *)displayLink\n{\n    dispatch_async(queue, ^{\n        if (self.writerInput.readyForMoreMediaData) {\n            CVReturn status = kCVReturnSuccess;\n            CVPixelBufferRef buffer = NULL;\n            CFTypeRef backingData;\n#if APPSTORE_SAFE || TARGET_IPHONE_SIMULATOR\n            __block UIImage *screenshot = nil;\n            dispatch_sync(dispatch_get_main_queue(), ^{\n                screenshot = [self screenshot];\n            });\n            CGImageRef image = screenshot.CGImage;\n\n            CGDataProviderRef dataProvider = CGImageGetDataProvider(image);\n            CFDataRef data = CGDataProviderCopyData(dataProvider);\n            backingData = CFDataCreateMutableCopy(kCFAllocatorDefault, CFDataGetLength(data), data);\n            CFRelease(data);\n\n            const UInt8 *bytePtr = CFDataGetBytePtr(backingData);\n\n            status = CVPixelBufferCreateWithBytes(kCFAllocatorDefault,\n                                                  CGImageGetWidth(image),\n                                                  CGImageGetHeight(image),\n                                                  kCVPixelFormatType_32BGRA,\n                                                  (void *)bytePtr,\n                                                  CGImageGetBytesPerRow(image),\n                                                  NULL,\n                                                  NULL,\n                                                  NULL,\n                                                  &buffer);\n            NSParameterAssert(status == kCVReturnSuccess && buffer);\n#else\n            IOSurfaceRef surface = [self.window createIOSurface];\n            backingData = surface;\n\n            NSDictionary *pixelBufferAttributes = @{(NSString *)kCVPixelBufferPixelFormatTypeKey : @(kCVPixelFormatType_32BGRA)};\n            status = CVPixelBufferCreateWithIOSurface(NULL, surface, (__bridge CFDictionaryRef _Nullable)(pixelBufferAttributes), &buffer);\n            NSParameterAssert(status == kCVReturnSuccess && buffer);\n#endif\n            if (buffer) {\n                CFAbsoluteTime currentTime = CFAbsoluteTimeGetCurrent();\n                CFTimeInterval elapsedTime = currentTime - firstFrameTime;\n\n                CMTime presentTime =  CMTimeMake(elapsedTime * TIME_SCALE, TIME_SCALE);\n\n                if(![self.writerInputPixelBufferAdaptor appendPixelBuffer:buffer withPresentationTime:presentTime]) {\n                    [self stopRecording];\n                }\n\n                CVPixelBufferRelease(buffer);\n            }\n\n            CFRelease(backingData);\n        }\n    });\n    \n    if (startTimestamp == 0.0) {\n        startTimestamp = displayLink.timestamp;\n    }\n    \n    NSTimeInterval dalta = displayLink.timestamp - startTimestamp;\n    \n    if (self.autosaveDuration > 0 && dalta > self.autosaveDuration) {\n        startTimestamp = 0.0;\n        [self rotateFile];\n    }\n}\n\n- (UIImage *)screenshot\n{\n    UIScreen *mainScreen = [UIScreen mainScreen];\n    CGSize imageSize = mainScreen.bounds.size;\n    UIGraphicsBeginImageContextWithOptions(imageSize, NO, 0);\n    \n    CGContextRef context = UIGraphicsGetCurrentContext();\n    \n    NSArray *windows = [[UIApplication sharedApplication] windows];\n    for (UIWindow *window in windows) {\n        if (![window respondsToSelector:@selector(screen)] || window.screen == mainScreen) {\n            CGContextSaveGState(context);\n            \n            CGContextTranslateCTM(context, window.center.x, window.center.y);\n            CGContextConcatCTM(context, [window transform]);\n            CGContextTranslateCTM(context,\n                                  -window.bounds.size.width * window.layer.anchorPoint.x,\n                                  -window.bounds.size.height * window.layer.anchorPoint.y);\n            \n            [window.layer.presentationLayer renderInContext:context];\n            \n            CGContextRestoreGState(context);\n        }\n    }\n    \n    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();\n    \n    UIGraphicsEndImageContext();\n    \n    return image;\n}\n\n#pragma mark Background tasks\n\n- (void)applicationDidEnterBackground:(NSNotification *)notification\n{\n    UIApplication *application = [UIApplication sharedApplication];\n    \n    UIDevice *device = [UIDevice currentDevice];\n    BOOL backgroundSupported = NO;\n    if ([device respondsToSelector:@selector(isMultitaskingSupported)]) {\n        backgroundSupported = device.multitaskingSupported;\n    }\n    \n    if (backgroundSupported) {\n        backgroundTask = [application beginBackgroundTaskWithExpirationHandler:^{\n            [self finishBackgroundTask];\n        }];\n    }\n    \n    [self stopRecording];\n}\n\n- (void)applicationWillEnterForeground:(NSNotification *)notification\n{\n    [self finishBackgroundTask];\n    [self startRecording];\n}\n\n- (void)finishBackgroundTask\n{\n    if (backgroundTask != UIBackgroundTaskInvalid) {\n        [[UIApplication sharedApplication] endBackgroundTask:backgroundTask];\n        backgroundTask = UIBackgroundTaskInvalid;\n    }\n}\n\n#pragma mark Utility methods\n\n- (NSString *)documentDirectory\n{\n\tNSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);\n\tNSString *documentsDirectory = [paths objectAtIndex:0];\n\treturn documentsDirectory;\n}\n\n- (NSString *)defaultFilename\n{\n    time_t timer;\n    time(&timer);\n    NSString *timestamp = [NSString stringWithFormat:@\"%ld\", timer];\n    return [NSString stringWithFormat:@\"%@.mov\", timestamp];\n}\n\n- (BOOL)existsFile:(NSString *)filename\n{\n    NSString *path = [self.documentDirectory stringByAppendingPathComponent:filename];\n    NSFileManager *fileManager = [[NSFileManager alloc] init];\n    BOOL isDirectory;\n    return [fileManager fileExistsAtPath:path isDirectory:&isDirectory] && !isDirectory;\n}\n\n- (NSString *)nextFilename:(NSString *)filename\n{\n    static NSInteger fileCounter;\n    \n    fileCounter++;\n    NSString *pathExtension = [filename pathExtension];\n    filename = [[[filename stringByDeletingPathExtension] stringByAppendingString:[NSString stringWithFormat:@\"-%@\", @(fileCounter)]] stringByAppendingPathExtension:pathExtension];\n    \n    if ([self existsFile:filename]) {\n        return [self nextFilename:filename];\n    }\n    \n    return filename;\n}\n\n- (NSURL *)outputFileURL\n{    \n    if (!self.filenameBlock) {\n        __block SRScreenRecorder *wself = self;\n        self.filenameBlock = ^(void) {\n            return [wself defaultFilename];\n        };\n    }\n    \n    NSString *filename = self.filenameBlock();\n    if ([self existsFile:filename]) {\n        filename = [self nextFilename:filename];\n    }\n    \n    NSString *path = [self.documentDirectory stringByAppendingPathComponent:filename];\n    return [NSURL fileURLWithPath:path];\n}\n\n@end\n"
  },
  {
    "path": "README.md",
    "content": "ScreenRecorder\n==============\nCapturing a screen as videos on iOS devices for user testing.\n\n## Features\n* Screen capture\n* Show touch pointer\n* Autosave and file rotation\n* Change FPS\n\n## Setup\n\n###1. Add the files  \nCopy the files you need to your project folder, and add them to your Xcode project.\n  * Lib/SRScreenRecorder.h\n  * Lib/SRScreenRecorder.m\n  * Vendor/KTouchPointerWindow.h\n  * Vendor/KTouchPointerWindow.m\n\n###2. Link with the frameworks\n  * QuartzCore.framework\n  * CoreVideo.framework\n  * CoreMedia.framework\n  * AVFoundation.framework\n\n## Usage\n###Basic  \n```objective-c\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n    [[SRScreenRecorder sharedInstance] startRecording];\n    return YES;\n}\n ```\n\nIn default settings, \n* save movie file automatically on enter background\n* and auto rotate save files every 10 minutes\n* movie file saved at document directory, named 'TIMESTAMP.mov'\n* 30 FPS\n* shows touch pointer\n\n###Customize  \n```objective-c\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n    SRScreenRecorder *recorder = [SRScreenRecorder sharedInstance];\n    recorder.frameInterval = 1; // 60 FPS\n    recorder.autosaveDuration = 1800; // 30 minutes\n    recorder.showsTouchPointer = NO; // hidden touch pointer\n    recorder.filenameBlock = ^(void) {\n        return @\"screencast.mov\";\n    }; // change filename\n    \n    [recorder startRecording];\n    \n    return YES;\n}\n ```\n\n###When submit to AppStore if includes this library, define APPSTORE_SAFE macro to eliminate using undocumented API\n```objective-c\n#define APPSTORE_SAFE 1\n ```\n\n## 3rd party libraries\n\n**KTouchPointerWindow**  \n[https://github.com/itok/KTouchPointerWindow](https://github.com/itok/KTouchPointerWindow)  \n \n[Apache]: http://www.apache.org/licenses/LICENSE-2.0\n[MIT]: http://www.opensource.org/licenses/mit-license.php\n[GPL]: http://www.gnu.org/licenses/gpl.html\n[BSD]: http://opensource.org/licenses/bsd-license.php\n\n## License\n\nScreenRecorder is available under the [MIT license][MIT]. See the LICENSE file for more info.\n"
  },
  {
    "path": "ScreenRecorder/SRAppDelegate.h",
    "content": "//\n//  SRAppDelegate.h\n//  ScreenRecorder\n//\n//  Created by kishikawa katsumi on 2012/12/26.\n//  Copyright (c) 2012 kishikawa katsumi. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface SRAppDelegate : UIResponder <UIApplicationDelegate>\n\n@property (strong, nonatomic) UIWindow *window;\n\n@end\n"
  },
  {
    "path": "ScreenRecorder/SRAppDelegate.m",
    "content": "//\n//  SRAppDelegate.m\n//  ScreenRecorder\n//\n//  Created by kishikawa katsumi on 2012/12/26.\n//  Copyright (c) 2012 kishikawa katsumi. All rights reserved.\n//\n\n#import \"SRAppDelegate.h\"\n#import \"SRScreenRecorder.h\"\n\n@implementation SRAppDelegate {\n    SRScreenRecorder *screenRecorder;\n}\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n    screenRecorder = [[SRScreenRecorder alloc] initWithWindow:self.window];\n    [screenRecorder startRecording];\n    \n    return YES;\n}\n\n@end\n"
  },
  {
    "path": "ScreenRecorder/SRDetailViewController.h",
    "content": "//\n//  SRDetailViewController.h\n//  ScreenRecorder\n//\n//  Created by kishikawa katsumi on 2012/12/26.\n//  Copyright (c) 2012 kishikawa katsumi. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface SRDetailViewController : UIViewController\n\n@property (strong, nonatomic) id detailItem;\n\n@property (weak, nonatomic) IBOutlet UILabel *detailDescriptionLabel;\n@end\n"
  },
  {
    "path": "ScreenRecorder/SRDetailViewController.m",
    "content": "//\n//  SRDetailViewController.m\n//  ScreenRecorder\n//\n//  Created by kishikawa katsumi on 2012/12/26.\n//  Copyright (c) 2012 kishikawa katsumi. All rights reserved.\n//\n\n#import \"SRDetailViewController.h\"\n\n@interface SRDetailViewController ()\n- (void)configureView;\n@end\n\n@implementation SRDetailViewController\n\n#pragma mark - Managing the detail item\n\n- (void)setDetailItem:(id)newDetailItem\n{\n    if (_detailItem != newDetailItem) {\n        _detailItem = newDetailItem;\n        \n        [self configureView];\n    }\n}\n\n- (void)configureView\n{\n    if (self.detailItem) {\n        self.detailDescriptionLabel.text = [self.detailItem description];\n    }\n}\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n    \n    [self configureView];\n}\n\n- (void)didReceiveMemoryWarning\n{\n    [super didReceiveMemoryWarning];\n}\n\n@end\n"
  },
  {
    "path": "ScreenRecorder/SRMasterViewController.h",
    "content": "//\n//  SRMasterViewController.h\n//  ScreenRecorder\n//\n//  Created by kishikawa katsumi on 2012/12/26.\n//  Copyright (c) 2012 kishikawa katsumi. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface SRMasterViewController : UITableViewController\n\n@end\n"
  },
  {
    "path": "ScreenRecorder/SRMasterViewController.m",
    "content": "//\n//  SRMasterViewController.m\n//  ScreenRecorder\n//\n//  Created by kishikawa katsumi on 2012/12/26.\n//  Copyright (c) 2012 kishikawa katsumi. All rights reserved.\n//\n\n#import \"SRMasterViewController.h\"\n#import \"SRDetailViewController.h\"\n\n@interface SRMasterViewController () {\n    NSMutableArray *_objects;\n}\n@end\n\n@implementation SRMasterViewController\n\n- (void)awakeFromNib\n{\n    [super awakeFromNib];\n}\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n    \n    self.navigationItem.leftBarButtonItem = self.editButtonItem;\n\n    UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject:)];\n    self.navigationItem.rightBarButtonItem = addButton;\n}\n\n- (void)didReceiveMemoryWarning\n{\n    [super didReceiveMemoryWarning];\n}\n\n- (void)insertNewObject:(id)sender\n{\n    if (!_objects) {\n        _objects = [[NSMutableArray alloc] init];\n    }\n    [_objects insertObject:[NSDate date] atIndex:0];\n    NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];\n    [self.tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];\n}\n\n#pragma mark - Table View\n\n- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView\n{\n    return 1;\n}\n\n- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section\n{\n    return _objects.count;\n}\n\n- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath\n{\n    static NSString *CellIdentifier = @\"Cell\";\n    UITableViewCell *cell;\n    if ([tableView respondsToSelector:@selector(dequeueReusableCellWithIdentifier:forIndexPath:)]) {\n        cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];\n    } else {\n        cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];\n        if (!cell) {\n            cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];\n        }\n    }\n\n    NSDate *object = _objects[indexPath.row];\n    cell.textLabel.text = [object description];\n    return cell;\n}\n\n- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath\n{\n    return YES;\n}\n\n- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath\n{\n    if (editingStyle == UITableViewCellEditingStyleDelete) {\n        [_objects removeObjectAtIndex:indexPath.row];\n        [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];\n    } else if (editingStyle == UITableViewCellEditingStyleInsert) {\n        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view.\n    }\n}\n\n- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender\n{\n    if ([[segue identifier] isEqualToString:@\"showDetail\"]) {\n        NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];\n        NSDate *object = _objects[indexPath.row];\n        [[segue destinationViewController] setDetailItem:object];\n    }\n}\n\n@end\n"
  },
  {
    "path": "ScreenRecorder/ScreenRecorder-Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UIMainStoryboardFile</key>\n\t<string>MainStoryboard</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UIStatusBarTintParameters</key>\n\t<dict>\n\t\t<key>UINavigationBar</key>\n\t\t<dict>\n\t\t\t<key>Style</key>\n\t\t\t<string>UIBarStyleDefault</string>\n\t\t\t<key>Translucent</key>\n\t\t\t<false/>\n\t\t</dict>\n\t</dict>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "ScreenRecorder/ScreenRecorder-Prefix.pch",
    "content": "//\n// Prefix header for all source files of the 'ScreenRecorder' target in the 'ScreenRecorder' project\n//\n\n#import <Availability.h>\n\n#ifndef __IPHONE_5_0\n#warning \"This project uses features only available in iOS SDK 5.0 and later.\"\n#endif\n\n#ifdef __OBJC__\n    #import <UIKit/UIKit.h>\n    #import <Foundation/Foundation.h>\n#endif\n"
  },
  {
    "path": "ScreenRecorder/en.lproj/InfoPlist.strings",
    "content": "/* Localized versions of Info.plist keys */\n\"CFBundleDisplayName\" = \"Recorder\";\n"
  },
  {
    "path": "ScreenRecorder/en.lproj/MainStoryboard.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"2.0\" toolsVersion=\"2844\" systemVersion=\"12C3006\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" initialViewController=\"3\">\n    <dependencies>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"1930\"/>\n    </dependencies>\n    <scenes>\n        <!--Navigation Controller-->\n        <scene sceneID=\"11\">\n            <objects>\n                <navigationController id=\"3\" sceneMemberID=\"viewController\">\n                    <navigationBar key=\"navigationBar\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" id=\"4\">\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <connections>\n                        <segue destination=\"12\" kind=\"relationship\" relationship=\"rootViewController\" id=\"19\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"10\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-1\" y=\"64\"/>\n        </scene>\n        <!--Master View Controller - Master-->\n        <scene sceneID=\"18\">\n            <objects>\n                <tableViewController storyboardIdentifier=\"\" title=\"Master\" id=\"12\" customClass=\"SRMasterViewController\" sceneMemberID=\"viewController\">\n                    <tableView key=\"view\" opaque=\"NO\" clipsSubviews=\"YES\" clearsContextBeforeDrawing=\"NO\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"plain\" rowHeight=\"44\" sectionHeaderHeight=\"22\" sectionFooterHeight=\"22\" id=\"13\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"64\" width=\"320\" height=\"504\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                        <prototypes>\n                            <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"blue\" accessoryType=\"disclosureIndicator\" hidesAccessoryWhenEditing=\"NO\" indentationLevel=\"1\" indentationWidth=\"0.0\" reuseIdentifier=\"Cell\" textLabel=\"phq-AM-6qj\" style=\"IBUITableViewCellStyleDefault\" id=\"lJ0-d7-vTF\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"22\" width=\"320\" height=\"44\"/>\n                                <autoresizingMask key=\"autoresizingMask\"/>\n                                <view key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\">\n                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"300\" height=\"43\"/>\n                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                    <subviews>\n                                        <label opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" text=\"Title\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"phq-AM-6qj\">\n                                            <rect key=\"frame\" x=\"10\" y=\"0.0\" width=\"280\" height=\"43\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"20\"/>\n                                            <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                                            <color key=\"highlightedColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"calibratedRGB\"/>\n                                        </label>\n                                    </subviews>\n                                    <color key=\"backgroundColor\" white=\"0.0\" alpha=\"0.0\" colorSpace=\"calibratedWhite\"/>\n                                </view>\n                                <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                <connections>\n                                    <segue destination=\"21\" kind=\"push\" identifier=\"showDetail\" id=\"jZb-fq-zAk\"/>\n                                </connections>\n                            </tableViewCell>\n                        </prototypes>\n                        <sections/>\n                        <connections>\n                            <outlet property=\"dataSource\" destination=\"12\" id=\"16\"/>\n                            <outlet property=\"delegate\" destination=\"12\" id=\"15\"/>\n                        </connections>\n                    </tableView>\n                    <navigationItem key=\"navigationItem\" title=\"Master\" id=\"36\"/>\n                </tableViewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"17\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"459\" y=\"64\"/>\n        </scene>\n        <!--Detail View Controller - Detail-->\n        <scene sceneID=\"24\">\n            <objects>\n                <viewController storyboardIdentifier=\"\" title=\"Detail\" id=\"21\" customClass=\"SRDetailViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"22\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"64\" width=\"320\" height=\"504\"/>\n                        <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                        <subviews>\n                            <label clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"scaleToFill\" text=\"Detail view content goes here\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" minimumFontSize=\"10\" id=\"27\">\n                                <rect key=\"frame\" x=\"20\" y=\"243\" width=\"280\" height=\"18\"/>\n                                <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                <fontDescription key=\"fontDescription\" type=\"system\" size=\"system\"/>\n                                <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Detail\" id=\"26\"/>\n                    <connections>\n                        <outlet property=\"detailDescriptionLabel\" destination=\"27\" id=\"28\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"23\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"902\" y=\"64\"/>\n        </scene>\n    </scenes>\n    <classes>\n        <class className=\"SRDetailViewController\" superclassName=\"UIViewController\">\n            <source key=\"sourceIdentifier\" type=\"project\" relativePath=\"./Classes/SRDetailViewController.h\"/>\n            <relationships>\n                <relationship kind=\"outlet\" name=\"detailDescriptionLabel\" candidateClass=\"UILabel\"/>\n            </relationships>\n        </class>\n        <class className=\"SRMasterViewController\" superclassName=\"UITableViewController\">\n            <source key=\"sourceIdentifier\" type=\"project\" relativePath=\"./Classes/SRMasterViewController.h\"/>\n        </class>\n    </classes>\n    <simulatedMetricsContainer key=\"defaultSimulatedMetrics\">\n        <simulatedStatusBarMetrics key=\"statusBar\"/>\n        <simulatedOrientationMetrics key=\"orientation\"/>\n        <simulatedScreenMetrics key=\"destination\" type=\"retina4\"/>\n    </simulatedMetricsContainer>\n</document>"
  },
  {
    "path": "ScreenRecorder/main.m",
    "content": "//\n//  main.m\n//  ScreenRecorder\n//\n//  Created by kishikawa katsumi on 2012/12/26.\n//  Copyright (c) 2012 kishikawa katsumi. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n#import \"SRAppDelegate.h\"\n\nint main(int argc, char *argv[])\n{\n    @autoreleasepool {\n        return UIApplicationMain(argc, argv, nil, NSStringFromClass([SRAppDelegate class]));\n    }\n}\n"
  },
  {
    "path": "ScreenRecorder.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t14068F05168A001400FA0A02 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14068F04168A001400FA0A02 /* UIKit.framework */; };\n\t\t14068F07168A001400FA0A02 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14068F06168A001400FA0A02 /* Foundation.framework */; };\n\t\t14068F09168A001400FA0A02 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14068F08168A001400FA0A02 /* CoreGraphics.framework */; };\n\t\t14068F0F168A001400FA0A02 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 14068F0D168A001400FA0A02 /* InfoPlist.strings */; };\n\t\t14068F11168A001400FA0A02 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 14068F10168A001400FA0A02 /* main.m */; };\n\t\t14068F15168A001400FA0A02 /* SRAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 14068F14168A001400FA0A02 /* SRAppDelegate.m */; };\n\t\t14068F17168A001400FA0A02 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 14068F16168A001400FA0A02 /* Default.png */; };\n\t\t14068F19168A001400FA0A02 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 14068F18168A001400FA0A02 /* Default@2x.png */; };\n\t\t14068F1B168A001400FA0A02 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 14068F1A168A001400FA0A02 /* Default-568h@2x.png */; };\n\t\t14068F1E168A001400FA0A02 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 14068F1C168A001400FA0A02 /* MainStoryboard.storyboard */; };\n\t\t14068F21168A001400FA0A02 /* SRMasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 14068F20168A001400FA0A02 /* SRMasterViewController.m */; };\n\t\t14068F24168A001400FA0A02 /* SRDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 14068F23168A001400FA0A02 /* SRDetailViewController.m */; };\n\t\t14068F2F168A01B100FA0A02 /* KTouchPointerWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 14068F2E168A01B100FA0A02 /* KTouchPointerWindow.m */; };\n\t\t14068F31168A02B300FA0A02 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14068F30168A02B300FA0A02 /* AVFoundation.framework */; };\n\t\t14068F37168A13DA00FA0A02 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14068F36168A13DA00FA0A02 /* CoreMedia.framework */; };\n\t\t14068F39168A13E200FA0A02 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14068F38168A13E100FA0A02 /* CoreVideo.framework */; };\n\t\t14068F3B168A13F800FA0A02 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14068F3A168A13F800FA0A02 /* QuartzCore.framework */; };\n\t\t14FD26F3168E3C3F005DFD21 /* SRScreenRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 14FD26F2168E3C3F005DFD21 /* SRScreenRecorder.m */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t14068F00168A001400FA0A02 /* ScreenRecorder.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScreenRecorder.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t14068F04168A001400FA0A02 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };\n\t\t14068F06168A001400FA0A02 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };\n\t\t14068F08168A001400FA0A02 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };\n\t\t14068F0C168A001400FA0A02 /* ScreenRecorder-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = \"ScreenRecorder-Info.plist\"; sourceTree = \"<group>\"; };\n\t\t14068F0E168A001400FA0A02 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = \"<group>\"; };\n\t\t14068F10168A001400FA0A02 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = \"<group>\"; };\n\t\t14068F12168A001400FA0A02 /* ScreenRecorder-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = \"ScreenRecorder-Prefix.pch\"; sourceTree = \"<group>\"; };\n\t\t14068F13168A001400FA0A02 /* SRAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SRAppDelegate.h; sourceTree = \"<group>\"; };\n\t\t14068F14168A001400FA0A02 /* SRAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SRAppDelegate.m; sourceTree = \"<group>\"; };\n\t\t14068F16168A001400FA0A02 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = \"<group>\"; };\n\t\t14068F18168A001400FA0A02 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"Default@2x.png\"; sourceTree = \"<group>\"; };\n\t\t14068F1A168A001400FA0A02 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"Default-568h@2x.png\"; sourceTree = \"<group>\"; };\n\t\t14068F1D168A001400FA0A02 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = \"<group>\"; };\n\t\t14068F1F168A001400FA0A02 /* SRMasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SRMasterViewController.h; sourceTree = \"<group>\"; };\n\t\t14068F20168A001400FA0A02 /* SRMasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SRMasterViewController.m; sourceTree = \"<group>\"; };\n\t\t14068F22168A001400FA0A02 /* SRDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SRDetailViewController.h; sourceTree = \"<group>\"; };\n\t\t14068F23168A001400FA0A02 /* SRDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SRDetailViewController.m; sourceTree = \"<group>\"; };\n\t\t14068F2D168A01B100FA0A02 /* KTouchPointerWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KTouchPointerWindow.h; path = Vendor/KTouchPointerWindow.h; sourceTree = SOURCE_ROOT; };\n\t\t14068F2E168A01B100FA0A02 /* KTouchPointerWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = KTouchPointerWindow.m; path = Vendor/KTouchPointerWindow.m; sourceTree = SOURCE_ROOT; };\n\t\t14068F30168A02B300FA0A02 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };\n\t\t14068F36168A13DA00FA0A02 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };\n\t\t14068F38168A13E100FA0A02 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };\n\t\t14068F3A168A13F800FA0A02 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };\n\t\t14FD26F1168E3C3F005DFD21 /* SRScreenRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SRScreenRecorder.h; path = Lib/SRScreenRecorder.h; sourceTree = SOURCE_ROOT; };\n\t\t14FD26F2168E3C3F005DFD21 /* SRScreenRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SRScreenRecorder.m; path = Lib/SRScreenRecorder.m; sourceTree = SOURCE_ROOT; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t14068EFD168A001400FA0A02 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t14068F05168A001400FA0A02 /* UIKit.framework in Frameworks */,\n\t\t\t\t14068F07168A001400FA0A02 /* Foundation.framework in Frameworks */,\n\t\t\t\t14068F09168A001400FA0A02 /* CoreGraphics.framework in Frameworks */,\n\t\t\t\t14068F3B168A13F800FA0A02 /* QuartzCore.framework in Frameworks */,\n\t\t\t\t14068F39168A13E200FA0A02 /* CoreVideo.framework in Frameworks */,\n\t\t\t\t14068F37168A13DA00FA0A02 /* CoreMedia.framework in Frameworks */,\n\t\t\t\t14068F31168A02B300FA0A02 /* AVFoundation.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t14068EF5168A001400FA0A02 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t14068F0A168A001400FA0A02 /* ScreenRecorder */,\n\t\t\t\t14068F03168A001400FA0A02 /* Frameworks */,\n\t\t\t\t14068F01168A001400FA0A02 /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t14068F01168A001400FA0A02 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t14068F00168A001400FA0A02 /* ScreenRecorder.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t14068F03168A001400FA0A02 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t14068F04168A001400FA0A02 /* UIKit.framework */,\n\t\t\t\t14068F06168A001400FA0A02 /* Foundation.framework */,\n\t\t\t\t14068F08168A001400FA0A02 /* CoreGraphics.framework */,\n\t\t\t\t14068F3A168A13F800FA0A02 /* QuartzCore.framework */,\n\t\t\t\t14068F38168A13E100FA0A02 /* CoreVideo.framework */,\n\t\t\t\t14068F36168A13DA00FA0A02 /* CoreMedia.framework */,\n\t\t\t\t14068F30168A02B300FA0A02 /* AVFoundation.framework */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t14068F0A168A001400FA0A02 /* ScreenRecorder */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t14FD26F4168E3C48005DFD21 /* Lib */,\n\t\t\t\t14FD26F5168E3C4F005DFD21 /* Vendor */,\n\t\t\t\t14FD26F6168E3C57005DFD21 /* Demo App */,\n\t\t\t\t14068F0B168A001400FA0A02 /* Supporting Files */,\n\t\t\t);\n\t\t\tpath = ScreenRecorder;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t14068F0B168A001400FA0A02 /* Supporting Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t14068F0C168A001400FA0A02 /* ScreenRecorder-Info.plist */,\n\t\t\t\t14068F0D168A001400FA0A02 /* InfoPlist.strings */,\n\t\t\t\t14068F10168A001400FA0A02 /* main.m */,\n\t\t\t\t14068F12168A001400FA0A02 /* ScreenRecorder-Prefix.pch */,\n\t\t\t\t14068F16168A001400FA0A02 /* Default.png */,\n\t\t\t\t14068F18168A001400FA0A02 /* Default@2x.png */,\n\t\t\t\t14068F1A168A001400FA0A02 /* Default-568h@2x.png */,\n\t\t\t);\n\t\t\tname = \"Supporting Files\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t14FD26F4168E3C48005DFD21 /* Lib */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t14FD26F1168E3C3F005DFD21 /* SRScreenRecorder.h */,\n\t\t\t\t14FD26F2168E3C3F005DFD21 /* SRScreenRecorder.m */,\n\t\t\t);\n\t\t\tname = Lib;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t14FD26F5168E3C4F005DFD21 /* Vendor */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t14068F2D168A01B100FA0A02 /* KTouchPointerWindow.h */,\n\t\t\t\t14068F2E168A01B100FA0A02 /* KTouchPointerWindow.m */,\n\t\t\t);\n\t\t\tname = Vendor;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t14FD26F6168E3C57005DFD21 /* Demo App */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t14068F13168A001400FA0A02 /* SRAppDelegate.h */,\n\t\t\t\t14068F14168A001400FA0A02 /* SRAppDelegate.m */,\n\t\t\t\t14068F1F168A001400FA0A02 /* SRMasterViewController.h */,\n\t\t\t\t14068F20168A001400FA0A02 /* SRMasterViewController.m */,\n\t\t\t\t14068F22168A001400FA0A02 /* SRDetailViewController.h */,\n\t\t\t\t14068F23168A001400FA0A02 /* SRDetailViewController.m */,\n\t\t\t\t14068F1C168A001400FA0A02 /* MainStoryboard.storyboard */,\n\t\t\t);\n\t\t\tname = \"Demo App\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t14068EFF168A001400FA0A02 /* ScreenRecorder */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 14068F27168A001400FA0A02 /* Build configuration list for PBXNativeTarget \"ScreenRecorder\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t14068EFC168A001400FA0A02 /* Sources */,\n\t\t\t\t14068EFD168A001400FA0A02 /* Frameworks */,\n\t\t\t\t14068EFE168A001400FA0A02 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = ScreenRecorder;\n\t\t\tproductName = ScreenRecorder;\n\t\t\tproductReference = 14068F00168A001400FA0A02 /* ScreenRecorder.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t14068EF7168A001400FA0A02 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tCLASSPREFIX = SR;\n\t\t\t\tLastUpgradeCheck = 0900;\n\t\t\t\tORGANIZATIONNAME = \"kishikawa katsumi\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t14068EFF168A001400FA0A02 = {\n\t\t\t\t\t\tDevelopmentTeam = 27AEDK3C9F;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 14068EFA168A001400FA0A02 /* Build configuration list for PBXProject \"ScreenRecorder\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t);\n\t\t\tmainGroup = 14068EF5168A001400FA0A02;\n\t\t\tproductRefGroup = 14068F01168A001400FA0A02 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t14068EFF168A001400FA0A02 /* ScreenRecorder */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t14068EFE168A001400FA0A02 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t14068F0F168A001400FA0A02 /* InfoPlist.strings in Resources */,\n\t\t\t\t14068F17168A001400FA0A02 /* Default.png in Resources */,\n\t\t\t\t14068F19168A001400FA0A02 /* Default@2x.png in Resources */,\n\t\t\t\t14068F1B168A001400FA0A02 /* Default-568h@2x.png in Resources */,\n\t\t\t\t14068F1E168A001400FA0A02 /* MainStoryboard.storyboard in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t14068EFC168A001400FA0A02 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t14068F11168A001400FA0A02 /* main.m in Sources */,\n\t\t\t\t14068F15168A001400FA0A02 /* SRAppDelegate.m in Sources */,\n\t\t\t\t14068F21168A001400FA0A02 /* SRMasterViewController.m in Sources */,\n\t\t\t\t14068F24168A001400FA0A02 /* SRDetailViewController.m in Sources */,\n\t\t\t\t14068F2F168A01B100FA0A02 /* KTouchPointerWindow.m in Sources */,\n\t\t\t\t14FD26F3168E3C3F005DFD21 /* SRScreenRecorder.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\t14068F0D168A001400FA0A02 /* InfoPlist.strings */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t14068F0E168A001400FA0A02 /* en */,\n\t\t\t);\n\t\t\tname = InfoPlist.strings;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t14068F1C168A001400FA0A02 /* MainStoryboard.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t14068F1D168A001400FA0A02 /* en */,\n\t\t\t);\n\t\t\tname = MainStoryboard.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t14068F25168A001400FA0A02 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_SYMBOLS_PRIVATE_EXTERN = NO;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.0;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t14068F26168A001400FA0A02 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.0;\n\t\t\t\tOTHER_CFLAGS = \"-DNS_BLOCK_ASSERTIONS=1\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t14068F28168A001400FA0A02 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tDEVELOPMENT_TEAM = 27AEDK3C9F;\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = \"ScreenRecorder/ScreenRecorder-Prefix.pch\";\n\t\t\t\tINFOPLIST_FILE = \"ScreenRecorder/ScreenRecorder-Info.plist\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.kishikawakatsumi.${PRODUCT_NAME:rfc1034identifier}\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tWRAPPER_EXTENSION = app;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t14068F29168A001400FA0A02 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tDEVELOPMENT_TEAM = 27AEDK3C9F;\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = \"ScreenRecorder/ScreenRecorder-Prefix.pch\";\n\t\t\t\tINFOPLIST_FILE = \"ScreenRecorder/ScreenRecorder-Info.plist\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.kishikawakatsumi.${PRODUCT_NAME:rfc1034identifier}\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tWRAPPER_EXTENSION = app;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t14068EFA168A001400FA0A02 /* Build configuration list for PBXProject \"ScreenRecorder\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t14068F25168A001400FA0A02 /* Debug */,\n\t\t\t\t14068F26168A001400FA0A02 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t14068F27168A001400FA0A02 /* Build configuration list for PBXNativeTarget \"ScreenRecorder\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t14068F28168A001400FA0A02 /* Debug */,\n\t\t\t\t14068F29168A001400FA0A02 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 14068EF7168A001400FA0A02 /* Project object */;\n}\n"
  },
  {
    "path": "Vendor/KTouchPointerWindow.h",
    "content": "//\n//  KTouchPointerWindow.h\n//\n//  Created by Ito Kei on 12/03/02.\n//  Copyright (c) 2012 itok. All rights reserved.\n//\n/*\n * call this function to start show pointer\n * \n * ex)\n * - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n *      KTouchPointerWindowInstall();\n *      ...\n * }\n */\nvoid KTouchPointerWindowInstall(void);\nvoid KTouchPointerWindowUninstall(void);\n"
  },
  {
    "path": "Vendor/KTouchPointerWindow.m",
    "content": "//\n//  TouchWindow.m\n//\n//  Created by Ito Kei on 12/03/02.\n//  Copyright (c) 2012 itok. All rights reserved.\n//\n\n#import \"KTouchPointerWindow.h\"\n#import <UIKit/UIKit.h>\n#import <objc/runtime.h>\n\nstatic BOOL installed;\n\nvoid KTouchPointerWindowInstall() \n{\n\tif (!installed) {\n\t\tinstalled = YES;\n\t\t\n\t\tClass _class = [UIWindow class];\n\t\t\n\t\tMethod orig = class_getInstanceMethod(_class, sel_registerName(\"sendEvent:\"));\n\t\tMethod my = class_getInstanceMethod(_class, sel_registerName(\"k_sendEvent:\"));\n\t\tmethod_exchangeImplementations(orig, my);\n\t}\n}\n\nvoid KTouchPointerWindowUninstall()\n{\n\tif (installed) {\n\t\tinstalled = NO;\n\t\t\n\t\tClass _class = [UIWindow class];\n\t\t\n\t\tMethod orig = class_getInstanceMethod(_class, sel_registerName(\"sendEvent:\"));\n\t\tMethod my = class_getInstanceMethod(_class, sel_registerName(\"k_sendEvent:\"));\n\t\tmethod_exchangeImplementations(orig, my);\n        \n        NSArray *windows = [[UIApplication sharedApplication] windows];\n        [windows makeObjectsPerformSelector:@selector(setNeedsDisplay)];\n\t}\n}\n\nstatic char s_key;\n\n@interface __KTouchPointerView : UIView\n\n@property (nonatomic, retain) NSSet *touches;\n\n@end\n\n@interface UIWindow (KTouchPointerWindow)\n\n@property (nonatomic, retain) __KTouchPointerView* k_touchPointerView;\n\n@end\n\n@implementation UIWindow (KTouchPointerWindow)\n\n- (__KTouchPointerView*) k_touchPointerView\n{\n\treturn objc_getAssociatedObject(self, &s_key);\n}\n\n-(void) setK_touchPointerView:(__KTouchPointerView *)value\n{\n\tobjc_setAssociatedObject(self, &s_key, value, OBJC_ASSOCIATION_RETAIN_NONATOMIC);\n}\n\n-(void) k_sendEvent:(UIEvent *)event\n{\n\tif (!self.k_touchPointerView) {\n\t\tself.k_touchPointerView = [[__KTouchPointerView alloc] initWithFrame:self.bounds];\n\t\tself.k_touchPointerView.backgroundColor = [UIColor clearColor];\n\t\tself.k_touchPointerView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;\n\t\tself.k_touchPointerView.userInteractionEnabled = NO;\n\t\t[self addSubview:self.k_touchPointerView];\n\t}\n\t\n\t[self bringSubviewToFront:self.k_touchPointerView];\n\t\n\tNSMutableSet *began = nil;\n\tNSMutableSet *moved = nil;\n\tNSMutableSet *ended = nil;\n\tNSMutableSet *cancelled = nil;\n\tfor (UITouch *touch in [event allTouches]) {\n\t\tswitch (touch.phase) {\n\t\t\tcase UITouchPhaseBegan:\n\t\t\t\tif (!began) {\n\t\t\t\t\tbegan = [NSMutableSet set];\n\t\t\t\t}\n\t\t\t\t[began addObject:touch];\n\t\t\t\tbreak;\n\t\t\tcase UITouchPhaseEnded:\n\t\t\t\tif (!ended) {\n\t\t\t\t\tended = [NSMutableSet set];\n\t\t\t\t}\n\t\t\t\t[ended addObject:touch];\n\t\t\t\tbreak;\n\t\t\tcase UITouchPhaseCancelled:\n\t\t\t\tif (!cancelled) {\n\t\t\t\t\tcancelled = [NSMutableSet set];\n\t\t\t\t}\n\t\t\t\t[cancelled addObject:touch];\n\t\t\t\tbreak;\n\t\t\tcase UITouchPhaseMoved:\n\t\t\t\tif (!moved) {\n\t\t\t\t\tmoved = [NSMutableSet set];\n\t\t\t\t}\n\t\t\t\t[moved addObject:touch];\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif (began) {\n\t\t[self.k_touchPointerView touchesBegan:began withEvent:event];\n\t}\n\tif (moved) {\n\t\t[self.k_touchPointerView touchesMoved:moved withEvent:event];\n\t}\n\tif (ended) {\n\t\t[self.k_touchPointerView touchesEnded:ended withEvent:event];\n\t}\n\tif (cancelled) {\n\t\t[self.k_touchPointerView touchesCancelled:cancelled withEvent:event];\n\t}\n\t[self k_sendEvent:event];\n}\n\n@end\n\n@implementation __KTouchPointerView\n\n@synthesize touches;\n\n- (void)drawRect:(CGRect)rect\n{\n\tfor (UITouch* touch in self.touches) {\n\t\tCGRect touchRect = CGRectZero;\n\t\ttouchRect.origin = [touch locationInView:self];\n\t\tUIBezierPath* bp = [UIBezierPath bezierPathWithOvalInRect:CGRectInset(touchRect, -10, -10)];\n\t\t[[UIColor colorWithRed:1 green:0 blue:0 alpha:0.6] set];\n\t\t[bp fill];\n\t}\n}\n\n- (void)touchesBegan:(NSSet *)_touches withEvent:(UIEvent *)event\n{\n\tself.touches = _touches;\n\t[self setNeedsDisplay];\n}\n\n- (void)touchesMoved:(NSSet *)_touches withEvent:(UIEvent *)event\n{\n\tself.touches = _touches;\n\t[self setNeedsDisplay];\t\n}\n\n- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event\n{\n\tself.touches = nil;\n\t[self setNeedsDisplay];\t\n}\n\n- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event\n{\n\tself.touches = nil;\n\t[self setNeedsDisplay];\n}\n\n@end\n"
  }
]