Avatar notebook default
14篇文章 · 12926字 · 1人关注
  • Swift 4 Classes

    类和结构体很像,同样是自定义类型,同样可以在内部定义属性和方法。我们知道结构体是值类型,而类是引用类型。实际使用时,我们用结构体来代表值,而用类...

  • Resize,w 360,h 240
    Swift 4 Structure Properties Methods

    Swift, in fact, includes four kinds of named types: structures, classes,...

  • Swift 4 String 练习

    练习1 实现一个函数,接收一个字符串,计算每个字符出现的次数。 按照字符出现的次数排序。 输出直方图。 技术点分析: guard语法糖,排除错误...

  • Swift 4 String

    Swift的字符串和OC有很大差别,下面详细学习下。 Grapheme Clusters (字形簇) As you know, a string...

  • Swift4 Closure 闭包练习

    repeatTask 数学计算 字典处理

  • Swift 4 Closure 闭包

    闭包的定义 A closure is simply a function with no name; you can assign it to ...

  • Swift 4 容器类型

    数组 字面值 空数组,因为空数组元素为空,swift无法推断其内部元素的数据类型,所以需要显示指定其数组类型。 创建带默认值的数组 数组的访问判...

  • Swift 4 Optionals 例子

    判断对错 可选值绑定方式实现函数 Nil coalescing方式实现上面的函数 嵌套可选值 客官,路过左下角小❤️❤️点下,谢谢啊:-D

  • Swift 4 Optionals 可选值

    什么是可选值类型 Swift introduces a whole new type, optional, that handles the p...

    1.1 6085 4 12

文集作者