Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

record video of iOS app on either device or simulator with touch indicator and without cursor

I want to record a video of my app for my website. I want it to look professional with a touch indicator to show touches but no cursor and no assistive touch indicator.

I know there are solutions using terminal or quicktime or even screen record on device. But I haven't found any particular solution that will allow me to show the screen touches but not the cursor.

Ideally the best thing would be to record it on the simulator and have the cursor be represented by a touch indicator which highlights when pressed.

Any professional solution will also be good. I have access to all adobe applications.

like image 741
alionthego Avatar asked Nov 07 '22 18:11

alionthego


1 Answers

Not the best solution but I did it in a hacky way of subclass UIApplication and override the sendEvent(_:) function. The function captures the UITouch object and give you access to the point of touch. Then in the function you can draw a circle or use a UIImage to indicate the touch point and animate it out after 1 or 2 seconds.

Sample code:

class MyApplication: UIApplication {
    override func sendEvent(_ event: UIEvent) {
        super.sendEvent(event)
        for touch in event.allTouches ?? [] where touch.phase == .ended {
            guard let view = touch.view else { continue }
            let center = touch.location(in: view)
            // You can draw a center using `UIBezierPath` or attach an UIImage to the UIView at this point
        }
    }
}
like image 130
congsun Avatar answered Nov 15 '22 04:11

congsun