ScannerApp-Swift Documentation

Class View​Controller

class ViewController: UIViewController  

View controller for the main activity

%59 ViewController ViewController UIViewController UIViewController ViewController->UIViewController UITableViewDelegate UITableViewDelegate ViewController->UITableViewDelegate UITableViewDataSource UITableViewDataSource ViewController->UITableViewDataSource

Conforms To

UITableViewDataSource
UITableViewDelegate
UIViewController

Properties

recording​Modes

let recordingModes: [RecordingMode] = [.singleCamera, .dualCamera, .arCamera, .stereoDepth] 

selected​Recording​Mode

var selectedRecordingMode: RecordingMode? = nil

select​Mode​Button

@IBOutlet weak var selectModeButton: UIButton! 

recording​Mode​Table​View

@IBOutlet weak var recordingModeTableView: UITableView! 

open​Camera​Button

@IBOutlet weak var openCameraButton: UIButton! 

Methods

view​Did​Load()

override func viewDidLoad()  

load components for the main activity

select​Mode​Button​Tapped(_:​)

@IBAction func selectModeButtonTapped(_ sender: Any)  

open​Camera​Button​Tapped(_:​)

@IBAction func openCameraButtonTapped(_ sender: Any)  

table​View(_:​number​OfRows​InSection:​)

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int  

table​View(_:​cell​For​Row​At:​)

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell  

table view for mode selections (Ex: Single camera)

table​View(_:​height​For​Row​At:​)

func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat  

table​View(_:​did​Select​Row​At:​)

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)  

after user select a mode, update UI