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

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.

主站蜘蛛池模板: 泊头市| 辛集市| 镇远县| 东宁县| 措美县| 陆良县| 开阳县| 赫章县| 蕉岭县| 开封市| 逊克县| 汾西县| 宜兰县| 清涧县| 沾化县| 鄂伦春自治旗| 社旗县| 沾化县| 玉树县| 汝南县| 高尔夫| 岳阳县| 育儿| 潍坊市| 孟村| 通化县| 石阡县| 阜城县| 鲁山县| 巫溪县| 两当县| 平陆县| 习水县| 普定县| 北流市| 丽江市| 凤庆县| 防城港市| 永州市| 东乡县| 老河口市|