iOS Code Snippet Show and record screen taps

Whilst iOS has a nice built-in screen recorder it doesn't show screen taps. If you are using a local mac, an easy way (though a bit of a hack) to show the taps which are then recordable is:

Download touchpose-master.zip from https://github.com/toddreed/Touchpose and then export from the zip: QtouchposeApplication.h and QtouchposeApplication.m.

Open your B4i app in Xcode and add the above two files to Xcode project.

Change main.m to
B4X:
#import <UIKit/UIKit.h>

#import "iCore.h"
#import "QTouchposeApplication.h"

int main(int argc, char * argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, NSStringFromClass([QTouchposeApplication class]), NSStringFromClass([B4IAppDelegate class]));
    }
}

and in QtouchposeApplication.m change:
B4X:
_alwaysShowTouches = NO;

to 

_alwaysShowTouches = YES;
Now run the app and the taps will be visible.
 
Top