Skip to main content

Writing Swift Code

  • Chapter
  • First Online:
Beginning iPhone Development with Swift 5
  • 2016 Accesses

Abstract

Every iOS app needs a user interface, but that user interface won’t do anything until you write Swift code to make it work. While you could write all your code in a single file, it’s better to divide your code into files where each file contains related code. A simple app might only contain a handful of files, but a more complicated app could contain dozens or even hundreds of separate files that contain related Swift code. Within each file, you can further organize your Swift code into separate functions.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+
from €37.37 /Month
  • Starting from 10 chapters or articles per month
  • Access and download chapters and articles from more than 300k books and 2,500 journals
  • Cancel anytime
View plans

Buy Now

Chapter
EUR 29.95
Price includes VAT (Netherlands)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
EUR 36.99
Price includes VAT (Netherlands)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Wallace Wang

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Wang, W. (2019). Writing Swift Code. In: Beginning iPhone Development with Swift 5. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4865-2_3

Download citation

Publish with us

Policies and ethics