-
backView查看全部
-
colorStripe查看全部
-
CGRect查看全部
-
UIView查看全部
-
let colors查看全部
-
Cocoa Touch Basics查看全部
-
5-4 Swift-字典的基础操作查看全部
-
import UIKit var courses = [76:"慕课网2048私人定制", 77:"CSS3 3D 特效", 127:"玩儿转Swift"] var websites = ["搜索引擎":"Google", "学习网站":"慕课网", "新闻网站":"网易新闻"] var courses2:Dictionary<Int, String> = [76:"慕课网2048私人定制", 77:"CSS3 3D 特效", 127:"玩儿转Swift"] var websites2:Dictionary<String, String> = ["搜索引擎":"Google", "学习网站":"慕课网", "新闻网站":"网易新闻"] var courses3:[Int: String] = [76:"慕课网2048私人定制", 77:"CSS3 3D 特效", 127:"玩儿转Swift"] var websites3:[String: String] = ["搜索引擎":"Google", "学习网站":"慕课网", "新闻网站":"网易新闻"] var dict = Dictionary<Int, String>() var dict2 = [Int:String]() websites = Dictionary<String, String>() websites = [String:String]() websites = [:]查看全部
-
Dictionary Type Dictionary<Int, String> [Int:String] Dictionary<String, String> [String:String]查看全部
-
Dictionarys 字典 var dictionary = [1: "A", 2: "B", 3: "C"] 字典存储的数据是键和值的数据对 所存储的数据中,键和值可以是任意数据类型 一个字典只能存储固定一种键和值的数据类型搭配查看全部
-
import UIKit var array = ["A", "B", "C", "D"]; array.count array.isEmpty array.append("G") array+=["H"] array.insert("hello", atIndex:0) array array.removeAtIndex(0) array.removeLast array[0] array[0]="AA" array[2...4] = ["CC", "DD", "EE"] array array[2...4]= ["Hello"] array for index in 0..array.count{ println(array[index]) } for item in array{ println(item) } for(index, item) in enumerate(array){ println("\(index) - \(item)") }查看全部
-
import UIKit var array = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K"] var array2:[String] = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K"] var array3:Array<String> = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K"] array[0] = "AA" array var array4 = [Int]() var str = String() var array5 = Array<String>() var array6:Array<Int> = [] array6.append(2) array6 = [] array6.append(3) array = [String]() array = Array<String>() array6 = [Int](count:10, repeatedValue:0) var array7:[Int] = [] array7 = [2, 3, 4] var array8 = array6 + array7查看全部
-
Array Type查看全部
-
Swift-as和OC-bridge查看全部
-
var str="你好" countElements(str) var str3:NSString = str str3.length查看全部
举报
0/150
提交
取消