Swift 语言学习笔记_1

About me: 在学习Swift之前完完全全的零基础编程,不知道变量与常量区别的那种零基础。

教程主要看   http://www.runoob.com/swift/swift-environment.html  和官方文档的原版对比着看https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/GuidedTour.html   我写下来的笔记一般都是上述教程没有说明的,需要自己去查的。

其它参考:swift官方网站:https://swift.org/

2017-2-19


```

import UIKit      //想创建IOS playground,需要引入import UIKit

var str = "Hello,playground"      //第一行程序

print(str)

print("hello,Youngxkk")

/*print是输出显示打印的意思,标记是:单词,符号。tips:需要加上双引号的情况是指要打印的字符串不是来自变量或者常量,也不涉及到其他代码的字符串。不用加双引号的情形是打印某个变量*/

"hello,world" //是字符串,是字符的序列集合,多个字母单词

"a"//是字符,也就是指的单个字母

```


//常量的命名可以由字母数字和下划线组成。

```

let _name = "youngxkk"

print(_name)

let 你好 = "hello or hi"

print(你好)

let name = "Youngxkkk"

let site = "www.youngxkk.com"

print("\(name)的网站地址是:\(site)")

```


//变量声明,在使用变量声名前,你需要使用var关键字声明它,如下

var meaningOfLife = 42      //变量命名

print(meaningOfLife)      //变量输出

var youngxkk = "百科小王子"      //变量命名

print(youngxkk)      //变量输出

print("youngxkk,u r god\(meaningOfLifetest)")      //变量输出


//标识符号:区分大小写MY与my是两上不同的标识符。


//swif字面量,直接了当的指出自己的类型并为亦是进行赋值的值

42      //整数形

3.14159       //浮点型

"hello"       //字符串型

true      //布尔型,英文=bool , 类似设计工具中的布尔运算,但又不完全相同,

//swift有两个布尔值bool的类型。也就是两个布尔常量,true和false,也就是他们只能是真或是假。通俗的讲就是非黑即白


/*Swift的可选(Optionals)类型,用于处理值缺失的情况,表示那儿有一个值"x"或者那儿没有值,

swift定义"?",问号作为命名类型Optional的简写*/

var optionalInteger: Int?

va roptionalInteger: Optional<Int>      //这一行不知为啥会报错,至少没解决???


//如果一个可选类型的实例包含一个值,可以在其后面加上后缀操作符"!"来访问这个值

OptionalInteger = 42

OptionalInteger!


let maxumumNumberOfLoginAttempts = 10

var currentLoginAttempt = 0

//常量,最大登录次数,变量,已经登录次数

var x = 0.0,Y = 0.0,Z = 0.0

//声名多个变量,逗号隔开。

var a = 2,b = 3,c = 4

print(a)

print(x)


var welcomeMessage: String

//欢迎提示的字符串,声明一个类型为string,名字为welcomeMessage的变量。

//welcome的变量“string”可以设置成任意字符串

welcomeMessage = "hello,world"

var iloveyou: String

iloveyou = "young"

print(iloveyou)

var red,green,blue: Double

//一行中类型的多个变量,逗号分割,最后一个变量名之后添加冒号和类型标注

let π = 3.1415926

let你好啊= "hello,world"

/*常量和变量的命名,常量或者变量声明为确定的类型后,不可使用相同的名子在次声明,或改变存储的类型,常量与变量不可互转。

但可以改变现有的变量值为其它同类型的值如下方*/

let constB:Float = 3.24232221

//常量后面的冒号和Float是类型标注

var friendlyWelcome = "hello!"

friendlyWelcome = "bonjour!"

//此时,friendlyWelcome输出的值是"bonjour!",常量值(let)不可以更改

print(welcomeMessage)

print("weilcome to my country \(welcomeMessage)")

//使用双引号和括号前加反斜杠,可以将常量或变量转义

let cat = "animal";print(cat)

//同一行中有多条独立语句时,使用分号区分

print(cat)

let minValue = UInt8.min

//minValue为0,是UInt8类型

let maxValue = UInt8.max

//maxValue为255,是UInt8类型

//double表示64位浮点数,精度很高,有15位,Float表示32位浮点数,只有6位。

let meaningOfLife = 42

//meaningOfLife会被推测为Int类型,整数类型。打印的时候提示框中显示了int

print(meaningOfLife)

let pi = 3.1415926

//pi会被推测为Double类型,下一行打码打印的时候弹窗提示框提示了Double

print(pi)

let anotherPi = 3 + 0.1415926

print(anotherPi)

/*anotherPi会被推测为Double类型

因为当表达示中同时出现整数和浮点数,会被推断为Double类型*/

/*

以上所了解的,提到了基本的数据类型,包括整数int,浮点数Double和Float,布尔类型Bool以及字符串类型String,此外Swift还提供了其它更强大的数据类型:Optional,Array,Dictionaty,Struct,Clsaa等

*/

//String型字面量,是由("")包含在内的广西字符集,如下

let wisewords = "\"我是百科小王子\" -"

let dollarsign = "\u{24}"

let blackheart = " \u{2665}"

//这里遇到一个问题,swift2.1及之前的版本都没有在24外面加上{}符号,所以编译一直出错,看了官方的3.0英文原版文档加是{}才正常。

/*

顺便记一下转义字符及含义\0空字符,\b退格,\f换页,\n换行,

\r回车,\t水平制表,\v垂直制表,重要的点\'是单引号,\"是双引号

下面尝试一下空格及换行

*/

let StringLiterals = "helloworld\n\n欢迎来查看我的swift学习笔记:\'www.youngxkk.com\'"

print(StringLiterals)

//算术运算符

var A = 10

var B = 20

print(A + B)

print("A - B = \(A - B)")

//比较运算符

print(A == B)//==是等于的意思

print(A != B)//!=是不等于的意思

print(A > B)//>是大于的意思

print(A <= B)//<=是小于或等于的意思,因为结果为true

/*逻辑运算符,下主是三个主要说明

&&逻辑于。如何运算符两侧都为TRUE则为TRUE

||逻辑或。如果运算符两侧至少有一个为TRUE则为TRUE

!逻辑非。布尔值取反,可以全true变false,使flase变为true

*/

var C = true

var D = false

print("C && D结果为:\(C && D)")

print("C || D结果为:\(C || D)")

print(!C)

print(!D)

//位运算符号用来对二进制进行操作

//赋值运算

var f = 10

var g = 20

var h = 100

h = h + 10//他的本意是本身的值在加上10,然后赋值给本身,为了简化,这个代码也可以写成h+=10

h = f + g

print("h结果为:\(h)")

//h是变量,不可以是常量,

h += g

print("h结果为:\(h)")//相当于h=h+g

h -= f

print("h结果为:\(h)")//相当于h=h-f

h *= g

print("h结果为:\(h)")//相当于h=h*g

h /= f

print("h结果为:\(h)")

//区间运算符

print("区间运算符1到5")

for index in 1...5 {

print("\(index)* 5 = \(index * 5)")

}

print("闭区间运算符1之后,小于5")

for index in 1..<5 {

print("\(index)* 5 = \(index * 5)")

}

//其它运算符号

var j = 10

var k = 20

var l = true

var m = false

print("j+k= \(j + k)")

print("k-j= \(k - j)")

print("三元运算:\(l?j : k)")

print("三元运算:\(m?j : k)")

//三元运算符条件是"?x:y",引号内的部分,如果添加为treue,值为x,否则为y

/*1,运算符的优先级,指针最优先,单目运算优于双目运算,例如正负号

2,先乘除(模),后加减

3,先算术运算,后移位运算,最后位运算。请特别注意:1 << 3 + 2 & 7等价于(1 <<(3 + 2))&7

4,逻辑运算最后计算

3和4暂时不懂,需要在查资料

*/

var n = 0

n = 2 + 3 * 4 / 6

print(n)

//上面表达示算法是3先乘以4在除6在加2等于4

/*条件语句

if语句:"由一个布尔表达式和一个或多个执行语句组成"

内嵌if语句:"你可以在if或else if中内嵌if或else if语句。"

switch语句:" switch语句允许测试一个变量等于多个值时的情况。"

*/

var ab = 10//检测条件

if ab < 20 {//如果条件语句为true,执行以下程序,if语句要带{}这种扩号

print("ab小于20")

}

print("ab的变量值为\(ab)")

//if...else :"else语句在布尔表达式为false时执行"

var bc:Int = 30

if bc > 100 {

print("bc大于100")

}else{

print("bc小于100")

}

print("bc的变量为\(ab)")

/*if...else if...else语句:"if后可以有可选的else if...else语句,else if...else语句常用于多个条件判断。"

*/

var cd = 100

if cd == 20 {

print("cd的值等于20");

} else if cd == 50 {

print("cd的值等于50");

} else {

print("没有匹配的条件");

}

print("cd的值等于\(cd)")

//switch语句的解释:switch就像是路由器,收到一个变量在去决定进行不同的操作,如果情况是1,那么值就是1,那就是case1。fallthrough,为连续运行的意思,因为swift默认不执行下去,其它的语言需要要case后面紧跟break,用break终止运行。

var abc = 10

switch abc{

case 100 :

print("abc的值为100")

case 10,20 :

print("abc的值为10或20")

case 50 :

print("abc的值为50")

default :

print("默认case")

}

print("abc的值为\(abc)")

//下面的实例使用fallthrough

var az = 100

switch az {

case 50 :

print("az的值为50")

fallthrough

case 100,200 :

print("az的值为100或200")

fallthrough

case 20 :

print("az的值为20")

default :

print("默认case")

}

//swift for循环

var someInts:[Int]=[10,20,30]

for index in 0 ..< 3

{

print("索引[\(index)]对应的值为\(someInts[index])")

}

//swift字符串

var StringA = ""

if StringA.isEmpty {

print("String是空的")

}else{

print("String不是空的")

}

var StringB = String()

if StringB.isEmpty {

print("StringB是空的")

}else{

print("String不是空的")

}

/*

Swift支持以下几种字符串函数及运算符,函数/运算符&描述

1

isEmpty

判断字符串是否为空,返回布尔值

2

hasPrefix(prefix: String)

检查字符串是否拥有特定前缀

3

hasSuffix(suffix: String)

检查字符串是否拥有特定后缀。

4

Int(String)

转换字符串数字为整型。实例:

let myString: String = "256"

let myInt: Int?= Int(myString)

5

String.characters.count

计算字符串的长度

6

utf8

您可以通过遍历String的utf8属性来访问它的UTF-8编码

7

utf16

您可以通过遍历String的utf8属性来访问它的UTF-16编码

8

unicodeScalars

您可以通过遍历String值的unicodeScalars属性来访问它的Unicode标量编码.

9

+

连接两个字符串,并返回一个新的字符串

10

+=

连接操作符两边的字符串并将新字符串赋值给左边的操作符变量

11

==

判断两个字符串是否相等

12

<

比较两个字符串,对两个字符串的字母逐一比较。

13

!=

比较两个字符串是否不相等。

*/

//字符串中插入值

var varA = 10

let letB = 20

var varC = 40

var varD = varA * letB - varC

var varE = "\(varA)+ \(letB)- \(varC)"

print(varD)

print(varE)

//字符串可以通过+号来连接

let name2 = "youngxkk"

let hi2 = "hellomike"

var String2 = hi2 + name2

print(String2)

//字符串长度使用String.characters.count属性来计算,如下

print("\(String2)的长度为\(String2.characters.count)")

//?:运算符

//条件运算符号?:可以用来代替if...else语句,他的一般形式如下:

(myString != nil)?myString : myString;

//myString是表达式,原文的“Exp1?Exp2 : Exp3;”报错,所以尝试了myString,

/*其中,Exp1、Exp2和Exp3是表达式。请注意,冒号的使用和位置。

?表达式的值是由Exp1决定的。如果Exp1为真,则计算Exp2的值,结果即为整个?表达式的值。如果Exp1为假,则计算Exp3的值,结果即为整个?表达式的值。

这个地方不理解,需要查资料

*/

let decimalInteger = 23

let binaryInteger = 0b10001

let octalInteger = 0o21

let hexadecimalInteger = 0x11

let maxInt8: Int8 = Int8.max

let minInt32: Int32 = Int32.min

let twoThousand: UInt16 = 2000

let one: UInt8 = 1

let twoThousandAndOne = twoThousand + UInt16(one)

//UInt8和UInt16是两个类型,不能直接相加,可以调用

let integerPi = Int(pi)

/*integerPi等于3,所以被推测为Int类型,

当然使用此方法浮点数会被截断,小数点后面的都没了*/

//类型别名

typealias AudioSample = UInt16

//定义好类型别名后,可以在使用使用原始名的地方使用别名

var maxAmplitudeFound = AudioSample.min

//maxAmplitudeFound现在是0

//布尔值,只有两个true or false

let orangesAreOrange = true

let turnipsAreDelicious = false

//下方是非常无比重要的条件语句:if语句,布尔值非常有用

if turnipsAreDelicious {

print("mum,tasty turnips")

}else{

print("Eww,turnips are horrible.")

}

//输出“Eww.turnips are horrible.”

//下方是控制流使用for ..in ...语法

for index in 1...6{

print("\(index)times 6 is \(index * 2)")

}

let names =["mike","young","jack","mianmian"]

for name in names {

print("hello,\(names)")

}

//tuples元组把多个值组合成一个复合值,内可以是任何类型

let http404error =(404,"not found")

//一个类型为(Int,String)的元组

let(statusCode,statusMessage)= http404error

print("The status code is \(statusCode)")

print("the statusMessage is \(statusMessage)")

//元组的内容被分解成单独的常量和变量

print("The status code is \(http404error.0)")

print("the status message is \(http404error.1)")

let http200Status =(statusCode: 200,description: "ok")

print("The Status code is \(statusCode)")

print("The Status code is \(http200Status.description)")

//可以用元组中的命名,也可以用.0和.1来表示函数返回值

//可选类型

let possibleNumber = "123"

let convertedNumber = Int(possibleNumber)

var serverResponseCode: Int?= 404

//serverResponseCode包含一个可选的Int值404

serverResponseCode = nil

var surveyAnswer: String?

/*Swift的nil和Objective-C中的nil并不一样。在Objective-C中,nil是一个指向不存在对象的指针。在Swift中,nil不是指针——它是一个确定的值,用来表示值缺失。任何类型的可选状态都可以被设置为nil,不只是对象类型。*/

//if语句以及强制解析

//下方是获取设备信息及打印出来

let mainBundle = NSBundle.mainBundle()

let identifier = mainBundle.bundleIdentifier

let info= mainBundle.infoDictionary

let bundleId= mainBundle.objectForInfoDictionaryKey("CFbundleName")

let version= mainBundle.objectForInfoDictionaryKey("CFBundleShortVersionString")

print("identifier:\(identifier)")

print("bundleId:\(bundleId)")

print("version:\(version)")

print("info:\(info)")

//在statues bar上显示风火轮效果

UIApplication.sharedApplication().networkActivityIndicatorVisible = true;

var dic =[0:4,1:5,2:6,3:7]

var newDic = dic

//check dic and newdic

dic[0]= 8

dic

newDic

/*集合类型(Collection Types)

Swift语言提供Arrays、Sets和Dictionaries三种基本的集合类型用来存储集合数据。数组(Arrays)是有序数据的集。集合(Sets)是无序无重复数据的集。字典(Dictionaries)是无序的键值对的集。

*/

//arr是数组,dict是词典

var array =[1,2,3,"hello","world",youngxkk,5,"6"]//其中的youngxkk为变量

array[2]

array[4]

array[7]

array[5]//多0开始,其中的第6个,是youngxkk,自动显示字符串

//字典类型快捷语法Swift的字典使用Dictionary定义,其中Key是字典中键的数据类型,Value是字典中对应于这些键所存储值的数据类型。

var dict =[10:"m",20:"i",30:"k",40:"e","mike":9]

dict[10]

dict[30]

dict["mike"]

//:-----------分割线------------,尝试一下HASH值,看有什么区别

CFHash("world")

CFHash(30)

//创建数组,使用构造语法来创建一个由特定数据类型构成的空数组

var someArray =[1,"hello"]

print(1)

let emptyArray =[String]()

let emptyDictionary =[String: Float]()

//创建一个带有默认值的数组

var FourDoubles =[Double](count: 4,repeatedValue: 0.0)

//FourDoubles是一种[Double]数组,等价于[0.0,0.0,0.0]

//通过两个数组相加创建一个数组

var anotherFourDoubles =[Double](count: 4,repeatedValue: 2.5)

//anotherFourDoubles被推断为[Double],等价于[2.5,2.5,2.5]

var eightDoubles = FourDoubles + anotherFourDoubles

//eightDoubles被推断为[Double],等价于[0,0,0,0,2.5,2.5,2.5]

//字面量构造数组

var shoppingList:[String]=["eggs","fruits"]

/*shoppoingLisr已经被构造,并且包含两个初始项。

shoppingList数组被声明为变量(var)而不是常量(let),是因为以后可能会加入更多数据*/

//访问和修改数组(这个数组有2个项)

print("the shoppingList contains\(shoppingList.count)items.")

//可以使用布尔值属性isEmpty作为检查count的属性是否为0的捷径

if shoppingList.isEmpty{

print("shoppingList is empty")

}else{

print("shoppinglist is not empty")}

//也可以使用append(_:)的方法在数组后面添加新的数据项

shoppingList .append("flour")

shoppingList.append("apple")

//除此之外,还可以使用加法赋值运算符+=直接在后面添加一个或多个数据项

shoppingList +=["water","music"]

//下面尝试一下使用下标语法来获取数据项,索引要放在中括号中

var secondItem = shoppingList[1]

//也可以使用下标来改变某个索引值对应的数据项

shoppingList[2]= "orange"

shoppingList[3...5]=["bananas","cook","coca"]

print(shoppingList)

//我们可以使用for-in循环来遍历数组中的数据项

for items in shoppingList{

print(items)

}

//Sets集合是指无序无重复数据的集

//创建一个空的集合

var letters = Set()

print("letters is of type Set with \(letters.count)items.")

//打印"letters is of type Set with 0 items."通过构造器,这里的letters变量的类型被推断为Set。

var favoriteGenres: Set =["Rock","Classical","hiphop"]

/*例子创建一个称之为favoriteGenres的集合来存储String类型的值:这个favoriteGenres变量被声明为“一个String值的集合”,写为Set。由于这个特定的集合含有指定String类型的值,所以它只允许存储String类型值。这里的favoriteGenres变量有三个String类型的初始值("Rock","Classical"和"Hip hop"),并以数组字面量的方式出现。

*/

//集合操作你可以高效地完成Set的一些基本操作,比如把两个集合组合到一起,判断两个集合共有元素,或者判断两个集合是否全包含,部分包含或者不相交.

let oddDigits: Set =[1,3,5,7,9]

let evenDigits: Set =[0,2,4,6,8]

let singleDigitPrimeNumbers: Set =[2,3,5,7]

oddDigits.union(evenDigits).sort()

//[0,1,2,3,4,5,6,7,8,9]都包含

oddDigits.intersect(evenDigits).sort()

//[]交集之内

oddDigits.subtract(singleDigitPrimeNumbers).sort()

//[1,9]不在B里面的,只要A里面。

oddDigits.exclusiveOr(singleDigitPrimeNumbers).sort()

//[1,2,9]交集之外

//While循环

/*while循环从计算单一条件开始。如果条件为true,会重复运行一系列语句,直到条件变为false。

下方是一个爬格子的游戏,有梯子和小蛇*/

let finalSquare = 25

var board =[Int](count: finalSquare + 1,repeatedValue: 0)

board[03]= +08;board[10]= +02;board[06]= +11;board[09]= +09;

board[14]= -10;board[19]= -11;board[22]= -02;board[24]= -08;

var square = 0

var diceRoll = 0

while square < finalSquare {

//掷骰子(diceRool)

diceRoll += 1

if diceRoll == 7 { diceRoll = 1 }

//根据点数移动

square += diceRoll

if square < board.count {

//如果玩家还在棋盘上,顺着梯子上去或者蛇滑下

square += board[square]

}

}

print("game over!")

//下方是Repeat-While循环,finalsquare,board,square,diceRoll初始化值和while值相同

/*

repeat {

//顺着梯子爬上去或者顺着蛇下来

square += board[square]*此处报错,不知道为什么,暂时注销*

//掷骰子

diceRoll += 1

if diceRoll == 7 { diceRoll = 1 }

//根据点数移动

square += diceRoll

}while square < finalSquare

print("game over!")

*/

//条件语句,if语句,适用于简单的条件

var temperature = 39

if temperature < 40 {

print("the temperature is cold")

}

if temperature < 32 {

print("the temperature is very cole")

}else if temperature >= 39 {

print("the temperature is normal= 39")

}

//Switch语句,更适用于条件较复杂、可能情况较多且需要用到模式匹配(pattern-matching)

/*switch some value to consider {

case value 1:

respond to value 1

case value 2,

value 3:

repond to value 2 or value 3

dafault:

otherwise,do something else

}

*/

let someCharacter: Character = "e"

switch someCharacter {

case "a","e","o","u":

print("\(someCharacter)is a vowel")

case "b","n","v","p","i","t","r","c":

print("\(someCharacter)is a consonant")

default:

print("\(someCharacter)is not a vowel or a consonant")

}

//switch和case的一些注意点,一个case可以包含多个模式,中间用逗号分开,冒号结尾:

//case的分支的模式也可以是一个值的区间。

let approximateCount = 99

let countedThing = "moons orbiting Saturn"

var naturalCount: String

switch approximateCount {

case 0:

naturalCount = "no"

case 1..<5:

naturalCount = "a few"

case 5..<12:

naturalCount = "several"

case 12..<100:

naturalCount = "dozens of"

case 100..<1000:

naturalCount = "hundreds of"

default:

naturalCount = "many"

}

print("there are \(naturalCount)\(countedThing)")

//输出"There are dozens of moons orbiting Saturn."

//元组(Tuple)

let somePoint =(1,1)

switch somePoint {

case(0,0):

print("(0,0)is at the origin")

case(_,0):

print("(\(somePoint.0),0)is on the x-axis")

case(0,_):

print("(0,\(somePoint.1))is on the y-axis")

case(-2...2,-2...2):

print("(\(somePoint.0),\(somePoint.1))is inside the box")

default:

print("(\(somePoint.0),\(somePoint.1))is outside of the box")

}

//输出"(1,1)is inside the box"

//字典重复学习

var someDict:[Int:String]=[1:"one",2:"two",3:"three"]

print(someDict[1])

var someVar = someDict[1]

print("key2的值为is \(someDict[2])")

print("key1的值为\(someVar)")

//函数(重点)

func sayHello(person: String)-> String {

let greeting = "Hello," + person + "!"

return greeting

}

print(sayHello("mike"))

/*重要的解释

调用sayHello(_:)函数时,在圆括号中传给它一个String类型的实参,例如sayHello("Anna")。因为这个函数返回一个String类型的值,sayHello可以被包含在print(_:separator:terminator:)的调用中,用来输出这个函数的返回值,正如上面所示。

在sayHello(_:)的函数体中,先定义了一个新的名为greeting的String常量,同时,把对personName的问候消息赋值给了greeting。然后用return关键字把这个问候返回出去。一旦return greeting被调用,该函数结束它的执行并返回greeting的当前值。

你可以用不同的输入值多次调用sayHello(_:)。上面的例子展示的是用"Anna"和"Brian"调用的结果,该函数分别返回了不同的结果。

为了简化这个函数的定义,可以将问候消息的创建和返回写成一句:

*/

func sayHelloAgain(person: String)-> String {

return "hello Again," + person + "!"

}

print(sayHelloAgain("Youngxkk"))

//函数也可以有无参函数,例如下面这个

func sayhelloworld()-> String {

return "hello,wrold"

}

print(sayhelloworld())

//无返回值函数

func saygoodbye(personName: String){

print("goodBye,\(personName)")

}

saygoodbye("Youngxkkk")

```

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 159,569评论 4 363
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,499评论 1 294
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 109,271评论 0 244
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 44,087评论 0 209
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,474评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,670评论 1 222
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,911评论 2 313
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,636评论 0 202
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,397评论 1 246
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,607评论 2 246
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,093评论 1 261
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,418评论 2 254
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,074评论 3 237
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,092评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,865评论 0 196
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,726评论 2 276
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,627评论 2 270

推荐阅读更多精彩内容

  • 2014年的苹果全球开发者大会(WWDC),当Craig Federighi向全世界宣布“We have new ...
    yeshenlong520阅读 2,191评论 0 9
  • SwiftDay011.MySwiftimport UIKitprintln("Hello Swift!")var...
    smile丽语阅读 3,806评论 0 6
  • importUIKit classViewController:UITabBarController{ enumD...
    明哥_Young阅读 3,673评论 1 10
  • 53.计算字符 在字符串中获取字符值的数量, 可以使用字符串字符属性中的计数属性: let unusualMena...
    无沣阅读 1,002评论 0 4
  • 首先要自我批评一下,尽管有客观理由延误,但迟了就是迟了,没有任何借口,昨晚的#每天一个关键词#终究还是过了零点才成...
    谈谈minda阅读 678评论 0 0