swift
zero_Arthur
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
swift learn 2
Swift基础学习 // Playground - noun: a place where people can play import UIKit var strArray = [String](); //可以使用append方法在数组后面添加新的数据项 strArray.append("Hello"); strArray.append("World"); //使用加法赋值运算符(+=)也原创 2014-11-25 16:54:50 · 596 阅读 · 0 评论 -
Swift learn 1
Swift基础语句学习原创 2014-11-25 16:15:47 · 691 阅读 · 0 评论 -
Swift之旅-Basic
// This is a Basic for swift import UIKit //用let来声明常量,用var来声明变量 let staticV = "static final value"; var param = "param0"; param = "param1"; //如果你的代码中有不需要改变的值,请使用let关键字将它声明为常量。只将需要改变的值声明为原创 2014-11-25 14:37:45 · 702 阅读 · 0 评论 -
Swift learn 5
Swift class学习原创 2014-11-27 11:36:51 · 777 阅读 · 0 评论 -
Swift learn 7
Swift 析构函数&扩展 // Playground - noun: a place where people can play import UIKit //析构函数的使用 struct Bank { static var coinsInBank = 10_000 static func vendCoins(var numberOfCoinsToVend: Int) ->原创 2014-11-28 15:37:03 · 656 阅读 · 0 评论 -
Swift learn 6
Swift Class继承处理 // Playground - noun: a place where people can play import UIKit //结构体&类的使用 struct NewStruct { var name:String = ""; var age:Int = 18; } class Person{ var person:NewStr原创 2014-11-28 11:06:51 · 624 阅读 · 0 评论 -
Swift learn 4
Swift 必包&enum的使用 // Playground - noun: a place where people can play import UIKit //闭包可以捕获和存储其所在上下文中任意常量和变量的引用。 这就是所谓的闭合并包裹着这些常量和变量,俗称闭包。Swift 会为您管理在捕获过程中涉及到的所有内存操作。 //全局函数是一个有名字但不会捕获任何值的闭包 //嵌套函数原创 2014-11-26 15:22:02 · 867 阅读 · 0 评论 -
Swift 函数的各种使用
Swift函数 在 Swift 中,每个函数都有一种类型,包括函数的参数值类型和返回值类型。你可以把函数类型当做任何其他普通变量类型一样处理,这样就可以更简单地把函数当做别的函数的参数,也可以从其他函数中返回函数。函数的定义可以写在在其他函数定义中,这样可以在嵌套函数范围内实现功能封装。 // Playground - noun: a place where people can play原创 2014-11-26 14:18:50 · 914 阅读 · 0 评论 -
Swift learn 3
Swift基础学习 // Playground - noun: a place where people can play import UIKit //如果你不需要知道区间内每一项的值,你可以使用下划线(_)替代变量名来忽略对值的访问 for _ in 1...5{ println("this is _"); } for var i=0; i<5; ++i{ printl原创 2014-11-25 17:30:09 · 704 阅读 · 0 评论 -
Swift learn 8
Swift学习 Swift语法总结 // Playground - noun: a place where people can play import UIKit //协议(Protocol)用于定义完成某项任务或功能所必须的方法和属性,协议实际上并不提供这些功能或任务的具体实现(Implementation)--而只用来描述这些实现应该是什么样的。 //类,结构体,枚举通过提供原创 2014-12-01 14:51:31 · 750 阅读 · 0 评论
分享