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

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.

主站蜘蛛池模板: 民丰县| 白山市| 苏尼特右旗| 保亭| 拉萨市| 河北省| 萨迦县| 莎车县| 许昌县| 新邵县| 东宁县| 北票市| 乐亭县| 钟祥市| 宁河县| 垫江县| 秭归县| 襄汾县| 武定县| 长治县| 靖西县| 深水埗区| 成都市| 荣昌县| 普格县| 玛曲县| 万州区| 额尔古纳市| 涪陵区| 六盘水市| 鸡西市| 班戈县| 景东| 山西省| 陈巴尔虎旗| 建阳市| 夏津县| 阳新县| 光泽县| 榆社县| 敦煌市|