三字符串与字符//1、字符串常量//在代码中可以使用由String预先定义的字符串常量,定义方式非常简单:let someString = "Some string literal value"//字符串常量可以包括下面这些特殊字符://空字符\0,反斜杠\,制表符\t,换行符\n,回车符\r,双引...
分类:
编程语言 时间:
2015-11-21 11:51:39
阅读次数:
227
1306. Sequence MedianTime limit: 1.0 secondMemory limit: 1 MBLanguage limit: C, C++, PascalGiven a sequence ofNnonnegative integers. Let's define the ...
分类:
其他好文 时间:
2015-11-19 22:22:49
阅读次数:
211
1.Have a smoke?2.Would you like a cigarette?3.Cigarettes?4.Let's go have a smoke.5.Do you smoke?6.Cigar or cigarette?7.Would you like to try one?8.Cou...
分类:
其他好文 时间:
2015-11-19 14:36:13
阅读次数:
132
创建Button let button = UIButton(type: .Custom) button.frame = CGRectMake(100, 100, 100, 100) button.backgroundColor = UIColor.oran...
分类:
其他好文 时间:
2015-11-19 11:09:12
阅读次数:
134
//延时加载 func delayLoad(){ let time: NSTimeInterval = 2.0 let delay = dispatch_time(DISPATCH_TIME_NOW, Int64(time * Double(NSE...
分类:
编程语言 时间:
2015-11-19 10:59:16
阅读次数:
274
KVC 方法//由于 tabBar是只读 不能够直接操作,如果要修改 可以使用KVC let mainTabBar = MainTabBar() //KVC 赋值 setValue(mainTabBar, forKey: "tabBar")MainTabBar 类里面就可以重写 t...
分类:
其他好文 时间:
2015-11-18 00:53:31
阅读次数:
171
下面呢, 我们就列举一些常用的swift的字符串的方法首先呢, 我们先定义一些字符串的变量和常量var welcome = "hello world" //值为hello youvar string = "hai"let ch: Character = "!"字符串的连接,其实的话, 字符串的连接的...
分类:
编程语言 时间:
2015-11-17 21:51:13
阅读次数:
266
1. ?? 运算符(NULL 合并运算符) 把这个放在第一个说是因为我觉得它很有用。用法:$a = $_GET['a'] ?? 1; 它相当于: String { let greeting = "Hello, " + personName + "!" return greeting}...
分类:
Web程序 时间:
2015-11-16 12:34:02
阅读次数:
181
Version 1.12015/11/16修复了上传图片画质问题的Bug修复了搜索功能的部分Bug增加了下拉刷新的功能修复了部分界面跳转之间的问题
分类:
其他好文 时间:
2015-11-16 00:55:33
阅读次数:
169
1.0 数据类型强转 范围小 --->范围大 不会丢失精度 ; 范围大 ---> 范围小 ,可能丢失精度 如 :Int(4.2) = 4 ;CGFloat(2) = 2.02.0 let a = 2 let b = 2.5 a + b 会报错类型不一致不能直接运算 但是 let ...
分类:
编程语言 时间:
2015-11-15 22:57:32
阅读次数:
216