Post

Replies

Boosts

Views

Activity

Comment on Thread 1: EXC_BAD_ACCESS (code=2, address=0x16f6a3ea0)
version of Xcode : 13 A question: why do you create an instance of the class inside the class ?   var instance = VideoViewController() ANS: BCS i am accesing playVideo() function in another viewcontroller on onclickbutton the video has to play `@IBAction func VideoPlay(_ sender: AnyObject)   {     let mainDirectory : String? = AppUtils.createFolder(directoryName: "Temp")     let subDirctory : String? = AppUtils.createSubFolder(mainDirectoryName: mainDirectory!, subDirectoryName: String(AppConstants.VIDEO_FIELD_ID))     let subFolderData : [String]? = AppUtils.getDataFromFolder(path: subDirctory!)     let name: String = AppPreference.getInstance().getString(AppConstants.VIDEO,  defaultvalue: "")         let streamingURL : URL = NSURL(string: subDirctory!.appending("/"+name)) as! URL  VideoViewController().instance.playVideo(url: streamingURL)   }`
May ’22