官术网_书友最值得收藏!

Building on the Swift Foundation

In the last chapter, we went through the basics of understanding data types and how to create variables and constants. Now that we are comfortable with those topics, let's look at adding more building blocks. This chapter will build on what we learned in the previous chapter and get us a bit closer to understanding Swift better.

The following topics will be covered in this chapter:

  • Type safety and type inference
  • Operations with integers
  • if statements
  • Optionals and optional bindings
  • Functions

Data types are good, but we will need to add some logic to our app. For example, we want to be able to control whether someone should see a login screen when they launch the app, or whether they should go right into the app. You will use logic a lot, so let's look at what an if statement is and how to use it.

主站蜘蛛池模板: 农安县| 浮梁县| 天祝| 新乐市| 磐安县| 四子王旗| 咸阳市| 石狮市| 酉阳| 西平县| 阿巴嘎旗| 沙洋县| 徐州市| 克什克腾旗| 富宁县| 嘉定区| 克东县| 同德县| 娄底市| 崇州市| 加查县| 屯昌县| 宝鸡市| 托里县| 清镇市| 上思县| 砚山县| 白银市| 红桥区| 和田市| 荃湾区| 通渭县| 清水县| 九寨沟县| 咸宁市| 仪征市| 北辰区| 汉寿县| 唐山市| 绥德县| 驻马店市|