-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathThemeTest.swift
More file actions
71 lines (50 loc) · 1.08 KB
/
ThemeTest.swift
File metadata and controls
71 lines (50 loc) · 1.08 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import UIKit
// This is a one-line c++ style comment http://url
/* This is a multi-
line comment comment */
/*!
Documentation Comment
@param var
*/
// MARK: - My Section
var myString : String = "hell"
myString += "o"
let implicitDouble : Double = 70.0
print("\(myString) world")
var array : Array<Any> = [myString,implicitDouble]
func functionName(_ i: Int) -> Void {
print(i)
}
for i in 0...2 {
functionName(i)
}
class Parent {
var name : String
init(_ name : String){
self.name = name
}
func fullname() -> String? {
return "\(name) Appleseed"
}
}
class Child : Parent { }
let johnny = Child("Johnny")
if let fullname = johnny.fullname(){
print(fullname)
}
enum Cases: Int {
case A = 1
case B, C
func simpleDescription() -> String {
switch self {
case .A:
return "alpha"
case .B:
return "beta"
default:
return String(self.rawValue)
}
}
}
let card = Cases.A
var TimeInterval : TimeInterval = NSTimeIntervalSince1970