-
stride函数控制循环查看全部
-
FileManager NS 前缀查看全部
-
ASYNC查看全部
-
多线程 let queue = DispatchQueue(label: "com.test.myqueue") queue.async{ print("Hello World") }查看全部
-
CGContext查看全部
-
UIView2查看全部
-
UIView查看全部
-
HKQuantityTypeIdentifier UIStatusBarStyle.lightContent Optional<String>.none查看全部
-
var arr = [0, 1, 2, 3] for (index, item) in arr.reversed().enumerated(){ print(index, item) }查看全部
-
scores.sorted() scores scores.sort() scores查看全部
-
var scores = [98, 92, 78, 100] for scoreInfo in scores.enumerated(){ print(scoreInfo) }查看全部
-
let list = StudentsList(students: ["A", "B", "C", "D"]) let f = list.addStudent(name:at:) f("liuyubobobo", 0) list let f2 = list.addStudent(name:after:) let f3 = list.addStudent(name:before:)查看全部
-
class StudentsList{ var students : [String] init(students : [String]){ self.students = students } func addStudent(name: String, at index: Int){ self.students.insert(name, at: index) } func addStudent(name: String, after student: String){ if let index = students.index(of: student){ self.students.insert(name, at: index) } } func addStudent(name: String, before student: String){ if let index = students.index(of: student){ self.students.insert(name, at: index+1) } } }查看全部
-
(Int)->(Int)->Int查看全部
-
selectScore查看全部
举报
0/150
提交
取消