Skip to main content
  • Book
  • © 2019

Swift 4 Recipes

Hundreds of Useful Hand-picked Code Snippets

Apress
  • Covers the latest version of Swift 4
  • Follows a dictionary-like approach, without unnecessary text—just the solutions you need
  • Offers a wide range of topics with over 340 recipes
  • 10k Accesses

Buy it now

Buying options

eBook USD 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access

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

Table of contents (13 chapters)

  1. Front Matter

    Pages i-lxi
  2. Beginner

    1. Front Matter

      Pages 1-1
    2. Introduction

      • Yanis Zafirópulos
      Pages 3-6
    3. Basics

      • Yanis Zafirópulos
      Pages 7-16
    4. Conditionals

      • Yanis Zafirópulos
      Pages 17-31
    5. Loops

      • Yanis Zafirópulos
      Pages 33-36
    6. Functions

      • Yanis Zafirópulos
      Pages 37-57
  3. Intermediate

    1. Front Matter

      Pages 59-59
    2. Classes and Closures

      • Yanis Zafirópulos
      Pages 61-82
    3. Strings

      • Yanis Zafirópulos
      Pages 83-130
    4. Arrays and Sets

      • Yanis Zafirópulos
      Pages 131-201
    5. Dictionaries

      • Yanis Zafirópulos
      Pages 203-226
  4. Advanced

    1. Front Matter

      Pages 227-227
    2. Numbers and Dates

      • Yanis Zafirópulos
      Pages 229-286
    3. Exceptions

      • Yanis Zafirópulos
      Pages 287-296
    4. Web, Files, and System

      • Yanis Zafirópulos
      Pages 297-348
    5. More Advanced Topics

      • Yanis Zafirópulos
      Pages 349-362
  5. Back Matter

    Pages 363-371

About this book

Get the most out of Swift 4 with this carefully compiled collection of select code snippets designed to solve everyday coding problems. This book features the Apress easy-to-use recipe format, with step-by-step instructions, and a no-fuss approach. 

You'll explore a wide range of topics, all neatly organized according to the language’s own core elements and building blocks. You'll review common topics such as conditionals, loops, functions, classes, closures, and arrays. This book also includes recipes to some more advanced problems found in files, system programming, and algorithms. 

With Swift 4 Recipes, your programming problems are easily resolved, without wading through paragraphs of text. 

What You'll Learn
  • Create if-switch statements, ternary operator, and nil-coalescing 
  • Work with numbers, conversions, mathematical functions 
  • Access the command line and retrieving system info
Who This Book Is For


Mac and iOS developers either looking for a quick problem-solution manual to get started or in search of a quick reference for everyday problems in a dictionary-like fashion.

Authors and Affiliations

  • Granada, Spain

    Yanis Zafirópulos

About the author

Ioannis Zafeiropoulosis a 32-year-old developer from Greece, living in the south of Spain. Before becoming a programmer, he studied medicine. But his lifelong passion for programming beginning when he was 7-year-olds has led to him writing code in practically every programming languages. He’s even created his own langauge. Swift Recipes has been his own day-to-day companion, whenever he’s need to find a solution to some Swift programming problem, or simply cannot remember one.

Bibliographic Information

  • Book Title: Swift 4 Recipes

  • Book Subtitle: Hundreds of Useful Hand-picked Code Snippets

  • Authors: Yanis Zafirópulos

  • DOI: https://doi.org/10.1007/978-1-4842-4182-0

  • Publisher: Apress Berkeley, CA

  • eBook Packages: Professional and Applied Computing, Apress Access Books, Professional and Applied Computing (R0)

  • Copyright Information: Yanis Zafir�pulos 2019

  • Softcover ISBN: 978-1-4842-4181-3Published: 11 December 2018

  • eBook ISBN: 978-1-4842-4182-0Published: 10 December 2018

  • Edition Number: 1

  • Number of Pages: LXI, 371

  • Number of Illustrations: 1 b/w illustrations

  • Topics: Apple and iOS

Buy it now

Buying options

eBook USD 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access