码迷,mamicode.com
首页 >  
搜索关键字:playground    ( 265个结果
Swift-8-枚举
// Playground - noun: a place where people can playimport UIKit// 枚举语法enum SomeEnumeration { // enumeration definition goes here}// 定义一个枚举enum Comp...
分类:编程语言   时间:2014-11-23 18:50:48    阅读次数:197
Swift-4-数组和字典
// Playground - noun: a place where people can playimport UIKit// 数组 字典// 集合的可变性 赋值给var的集合是可变的mutable,赋值给let的集合是不可变的immutable// 数组 Array 等价于 [SomeTy.....
分类:编程语言   时间:2014-11-23 18:47:08    阅读次数:289
痛定思痛-》》准备用swift改版一个项目
swift 优势:1、简洁(不是说语法体系简洁,而是书写)2、结合playground,做到真正意义上的所见即所得3、便于扩展(能桥接ObjC)4、还有直接支持闭包。你想在哪儿定义函数就在哪儿定义。5、而且既能面向过程,又能面向对象,还能来个函数式编程风格当然,因为之前的项目费代码一大堆。我接手这个...
分类:编程语言   时间:2014-11-04 12:34:51    阅读次数:191
swift 初见-5集合类型
// Playground - noun: a place where people can playimport UIKitvar str = "Hello, playground"// swift的集合类型只有数组和字典// 数组中只能存储相同类型的数据(可以是基本类型,也可以是类对象)// 申...
分类:编程语言   时间:2014-11-01 09:46:11    阅读次数:217
swift 初见-6集合类型与Cocoa Touch混编
// Playground - noun: a place where people can playimport UIKitvar str = "Hello, playground"// color与=号之间必须有个空格let colors =[ "Air Force Blue":(red:...
分类:编程语言   时间:2014-11-01 09:43:28    阅读次数:206
swift 初见-4运算符与字符串操作
// Playground - noun: a place where people can playimport UIKit//import Foundationvar str = "Hello, playground"//swift 新运算符 Nil Coalescing Operator (....
分类:编程语言   时间:2014-10-31 15:34:18    阅读次数:122
swift 初见-2
直接上代码:// Playground - noun: a place where people can playimport UIKitvar str = "Hello, playground"// 使用if ,switch 来进行条件操作 ,for-in , for ,while ,do-whi...
分类:编程语言   时间:2014-10-28 23:57:06    阅读次数:346
Swift(1) 基本语法
【适合对象】有一定编程基础的同学【情景】边看边练,多练多学,自然成长。【声明】此文章属于原创作品,未经授权,如非法转载,予以追究法律责任。练习笔记:1.var变量var str = "Hello, playground"println(str) 2.if语句var a = 20if a > 10 ....
分类:编程语言   时间:2014-10-21 21:23:41    阅读次数:358
swift基本用法-switch用法
// Playground - noun: a place where people can play import UIKit //------------------------------------------------------------------------------ // 1. 基本使用 // switch 与OC的区别: // 1> 不需要写break // 2> 每...
分类:编程语言   时间:2014-10-21 15:26:06    阅读次数:220
swift基本用法-for循环遍历,遍历字典,循环生成数组
// Playground - noun: a place where people can play import UIKit //------------------------------------------------------------------------------ // 1. for // 传统的for循环方式在swift中同样支持 var num = 0 for(v...
分类:编程语言   时间:2014-10-20 15:14:51    阅读次数:221
265条   上一页 1 ... 22 23 24 25 26 27 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!