𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Learn Swift by building applications explore Swift programming through iOS app development

✍ Scribed by Atanasov, Emil


Publisher
Packt Publishing
Year
2018
Tongue
English
Leaves
356
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Start building your very own mobile apps with this comprehensive introduction to Swift and object-oriented programming About This Book A complete beginner's guide to Swift programming language Understand core Swift programming concepts and techniques for creating popular iOS apps Start your journey toward building mobile app development with this practical guide Who This Book Is For This book is for beginners who are new to Swift or may have some preliminary knowledge of Objective-C. If you are interested in learning and mastering Swift in Apple's ecosystem, namely mobile development, then this book is for you. What You Will Learn Become a pro at iOS development by creating simple-to-complex iOS mobile applications Master Playgrounds, a unique and intuitive approach to teaching Xcode Tackle the basics, including variables, if clauses, functions, loops and structures, classes, and inheritance Model real-world objects in Swift and have an in-depth understanding of the data structures used, along with OOP concepts and protocols Use CocoaPods, an open source Swift package manager to ease your everyday developer requirements Develop a wide range of apps, from a simple weather app to an Instagram-like social app Get ahead in the industry by learning how to use third-party libraries efficiently in your apps In Detail Swift Language is now more powerful than ever; it has introduced new ways to solve old problems and has gone on to become one of the fastest growing popular languages. It is now a de-facto choice for iOS developers and it powers most of the newly released and popular apps. This practical guide will help you to begin your journey with Swift programming through learning how to build iOS apps. You will learn all about basic variables, if clauses, functions, loops, and other core concepts; then structures, classes, and inheritance will be discussed. Next, you'll dive into developing a weather app that consumes data from the internet and presents information to the user. The final project is more complex, involving creating an Instagram like app that integrates different external libraries. The app also uses CocoaPods as its package dependency manager, to give you a cutting-edge tool to add to your skillset. By the end of the book, you will have learned how to model real-world apps in Swift. Style and approach This book has a very practical and hands-on approach towards teaching the user the new and advanced features of Swift. Downloading the...

✦ Table of Contents


Cover......Page 1
Title Page......Page 2
Copyright and Credits......Page 3
Packt Upsell......Page 4
Contributors......Page 5
Table of Contents......Page 7
Preface......Page 11
Chapter 1: Swift Basics – Variables and Functions......Page 16
Variables......Page 17
Optional types......Page 22
Enumeration types......Page 23
The if statements – how to control the code flow......Page 24
Loops......Page 25
The while loops......Page 26
The switch statement......Page 27
Functions......Page 29
What is a tuple?......Page 31
How to tackle huge problems – bottom-up versus top-down......Page 33
Summary......Page 35
Installing Xcode......Page 36
Exploring Xcode......Page 39
Toolbar......Page 41
Menu......Page 45
The Navigator panel (located to the left)......Page 47
The Debug panel (located at the bottom)......Page 48
The Utilities panel (located to the right)......Page 49
Xcode preferences window......Page 51
What is a playground?......Page 54
Let's add some code......Page 55
How to add resource to a playground......Page 62
Converting a playground to a workspace......Page 63
Different items in the markup language......Page 64
Basic markup items......Page 66
Summary......Page 69
Chapter 3: Creating a Minimal Mobile App......Page 70
Your first iOS application......Page 71
AppDelegate......Page 84
Application states......Page 86
ViewController......Page 87
Git......Page 89
Summary......Page 93
Structures and classes......Page 94
Extensions......Page 101
Type properties and functions......Page 104
Adding custom data types to a playground......Page 106
Base class......Page 110
Class properties......Page 113
Model-View-Controller (MVC)......Page 114
Summary......Page 118
Storyboards......Page 119
Visual components......Page 121
Adding items to the storyboard......Page 128
Linking the UI with the code......Page 132
General discussion......Page 148
Summary......Page 149
Primary collection types......Page 150
Generics......Page 151
Array......Page 152
Set......Page 154
Dictionary......Page 158
How to choose the best collection type......Page 160
UICollectionView......Page 161
UICollectionViewCell......Page 164
Reusing cells......Page 167
Layouts......Page 169
Table view in iOS app......Page 173
Model list of cities......Page 175
Displaying all cities......Page 177
Adding search......Page 182
Protocols......Page 185
Protocols and inheritance......Page 187
Summary......Page 190
Chapter 7: Developing a Simple Weather App......Page 191
Defining the app screens......Page 192
The home screen......Page 198
Favorite locations......Page 202
Constraints......Page 204
Picking a location......Page 206
Model......Page 208
Locations......Page 217
The first segue......Page 222
How to pass data......Page 225
Passing information in the reverse direction......Page 227
Defining a custom segue......Page 228
Further improvements......Page 229
Summary......Page 230
Chapter 8: Introducing CocoaPods and Project Dependencies......Page 231
Software – the modern way......Page 232
Ruby and CocoaPods......Page 233
How to use it......Page 234
CocoaPods useful commands......Page 238
Carthage......Page 239
Swift Package ManagerΒ ......Page 240
Useful commands......Page 241
Popular third-party libraries......Page 247
Alamofire......Page 248
Texture......Page 249
RxSwift......Page 250
Summary......Page 251
Chapter 9: Improving a Version of a Weather App......Page 252
What's an API?......Page 253
List of requests......Page 255
Creating new models......Page 257
Pure network requests......Page 260
Alamofire implementation......Page 266
Improvements using third-party libraries......Page 269
Better error handling......Page 271
About the screen......Page 273
Summary......Page 277
Tabbed app project......Page 278
Firebase......Page 279
Login......Page 281
The different screens......Page 288
Custom buttons on the tab bar......Page 289
Creating a post......Page 292
Models......Page 298
Firebase......Page 300
Filters......Page 305
Summary......Page 307
Home screen......Page 308
Profile screen......Page 314
Search screen......Page 322
Favorites screen......Page 326
Polishing the home screen......Page 328
SummaryΒ ......Page 340
Your account at GitHub......Page 341
Forking a repository......Page 342
Let's contribute......Page 343
Pull request......Page 345
Summary......Page 348
Other Books You May Enjoy......Page 350
Index......Page 353

✦ Subjects


Application software ; Development;Electronic books;Electronic books ; local;iOS (Electronic resource);Mobile apps;Swift (Computer program language);Application software;Development;local


πŸ“œ SIMILAR VOLUMES


Learn Swift by Building Applications: Ex
✍ Emil Atanasov πŸ“‚ Library πŸ“… 2018 πŸ› Packt Publishing 🌐 English

Start building your very own mobile apps with this comprehensive introduction to Swift and object-oriented programming Key Features β€’ A complete beginner's guide to Swift programming language β€’ Understand core Swift programming concepts and techniques for creating popular iOS apps β€’ Start your

Learn Swift by building applications exp
✍ Atanasov, Emil πŸ“‚ Library πŸ“… 2018 πŸ› Packt Publishing 🌐 English

Swift Language is now more powerful than ever; it has introduced new ways to solve old problems and has gone on to become one of the fastest growing popular languages. It is now a de-facto choice for iOS developers and it powers most of the newly released and popular apps. This practical guide will

Learn Swift by building applications exp
✍ Atanasov, Emil πŸ“‚ Library πŸ“… 2018 πŸ› Packt Publishing 🌐 English

Swift Language is now more powerful than ever; it has introduced new ways to solve old problems and has gone on to become one of the fastest growing popular languages. It is now a de-facto choice for iOS developers and it powers most of the newly released and popular apps. This practical guide will

Learn Swift by building applications exp
✍ Emil Atanasov πŸ“‚ Library πŸ“… 2018 πŸ› Packt Publishing 🌐 English

Start building your very own mobile apps with this comprehensive introduction to Swift and object-oriented programming About This Book A complete beginner's guide to Swift programming language Understand core Swift programming concepts and techniques for creating popular iOS apps Start your journey