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

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.

主站蜘蛛池模板: 贺州市| 连城县| 靖西县| 河北省| 曲周县| 武川县| 化德县| 天祝| 陇西县| 中西区| 六枝特区| 竹山县| 新乡市| 雷山县| 深圳市| 砀山县| 潼关县| 宜阳县| 交口县| 大渡口区| 凌云县| 阳曲县| 平顶山市| 元江| 万载县| 西安市| 孙吴县| 古丈县| 易门县| 榆社县| 广水市| 奉贤区| 炎陵县| 德令哈市| 鹤岗市| 池州市| 苏州市| 抚远县| 临泽县| 玛沁县| 昭苏县|