Skip to main content

Posts

Showing posts from April, 2021

Record UIView In iOS Swift (XCode)

This blog used for helping to Record a UIView.                     It records animations and actions as they happen by taking screen shots of a UIView in a series and then creating a video and saving it to your app’s document folder.  Create  Recorder.swift  File .      This file take screenshot of UIView in a series and save that images in document directory.   import UIKit @objc public class Recorder : NSObject {          var displayLink : CADisplayLink ?     var outputPath : NSString ?     var referenceDate : NSDate ?     var imageCounter = 0          public var view : UIView ?     public var name = "image"     public var outputJPG = false          var imagesArray = [ URL ]()          public func start () {                  if ( view == nil ) {             NSException (name: NSExceptionName (rawValue: "No view set" ), reason: "You must set a view before calling start." , userInfo: nil ). raise ()         }         else {