-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVideoModel.swift
More file actions
36 lines (28 loc) · 866 Bytes
/
VideoModel.swift
File metadata and controls
36 lines (28 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// VideoModel.swift
// VideoDL
//
// Created by Vivek Padaya on 11/01/18.
// Copyright © 2018 Vivek. All rights reserved.
//
import UIKit
class VideoModel: NSObject,NSCoding {
var fileName : String!
var filePath : String!
init(file_name: String, file_path: String) {
self.fileName = file_name
self.filePath = file_path
}
override init() {
print("Init video model")
}
required convenience init(coder aDecoder: NSCoder) {
let file_name = aDecoder.decodeObject(forKey: "name") as! String
let file_path = aDecoder.decodeObject(forKey: "path") as! String
self.init(file_name: file_name, file_path: file_path)
}
func encode(with aCoder: NSCoder) {
aCoder.encode(fileName, forKey: "name")
aCoder.encode(filePath, forKey: "path")
}
}