Browse Results

Showing 52,851 through 52,875 of 61,781 results

Swift 4 Recipes

by Yanis Zafirópulos

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 LearnCreate if-switch statements, ternary operator, and nil-coalescing Work with numbers, conversions, mathematical functions Access the command line and retrieving system infoWho This Book Is ForMac 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.

Swift 5 for Absolute Beginners: Learn to Develop Apps for iOS

by Gary Bennett Stefan Kaczmarek Brad Lees

Stay motivated and overcome obstacles while learning to use Swift Playgrounds and Xcode 10.2 to become a great iOS developer. This book, fully updated for Swift 5, is perfect for those with no programming background, those with some programming experience but no object-oriented experience, or those that have a great idea for an app but haven’t programmed since school.Many people have a difficult time believing they can learn to write iOS apps. Swift 5 for Absolute Beginners will show you how to do so. You'll learn Object-Oriented Programming (OOP) and be introduced to User Interface (UI) design following Apple’s Human Interface Guidelines (HIG) using storyboards and the Model-View-Controller (MVC) pattern before moving on to write your own iPhone and Apple Watch apps from scratch.What You’ll LearnWork with Swift classes, properties, and functionsExamine proper User Interface (UI) and User Experience (UX) designUnderstand Swift data types: integers, floats, strings, and booleansUse Swift data collections: arrays and dictionariesReview Boolean logic, comparing data, and flow controlUse the Xcode debugger to troubleshoot problems with your appsStore data in local app preferences and Core Data databases Who This Book Is ForAnyone who wants to learn to develop apps for the Mac, iPhone, iPad, and Apple Watch using the Swift programming language. No previous programming experience is necessary.

Swift 5.3 Cookbook - Second Edition: Over 60 proven recipes for developing better iOS applications with Swift 5.3, 2nd Edition

by Chris Barker Keith Moon

Discover code-rich recipes ideal for developers new to Swift and those looking to explore the latest features of Swift 5.3Key FeaturesLearn Swift 5.3 programming techniques to write robust and efficient codeDiscover the fundamentals of the Swift programming language and build apps with frameworks such as Foundation, Networking, and UIKitGet to grips with the new features of Swift 5.3, including SwiftUIBook DescriptionSwift is an exciting, multi-platform, general-purpose programming language, and this book will help you explore the features of its latest version, Swift 5.3.The book begins with an introduction to the basic building blocks of Swift 5.3, its syntax, and the functionalities of Swift constructs. You’ll then discover how Swift Playgrounds provide an ideal platform to write, execute, and debug your Swift code. As you advance through the chapters, the book will show you how to bundle variables into tuples or sets, order your data with an array, store key-value pairs with dictionaries, and use property observers. You’ll also learn about the decision-making and control structures in Swift, examine advanced features such as generics and operators, and explore functionalities outside of the standard library. Once you’ve learned how to build iOS applications using UIKit, you'll find out how to use Swift for server-side programming, run Swift on Linux, and investigate Vapor. Finally, you'll discover some of the newest features of Swift 5.3, using SwiftUI and Combine to build adaptive and reactive applications.By the end of the book, you'll have discovered direct solutions that will help you become productive while developing code using Swift 5.3.What you will learnExplore basic to advanced concepts in Swift 5.3 programmingUnderstand conditional statements, loops, and how to handle errors in SwiftDefine flexible classes and structs using genericsUse advanced operators and create custom onesBuild iOS apps using the powerful features of UIKit or the new SwiftUI frameworkImport your own custom functionality into Swift PlaygroundsRun Swift on Linux and investigate server-side programming with the server-side framework VaporWho This Book Is ForIf you are looking to get started with Swift 5.3 or want to learn about the diverse features it offers, along with tips and tricks to efficiently code and build applications, then this book is for you. Basic knowledge of general programming concepts will assist with understanding key concepts.Table of ContentsSwift Building BlocksBuilding on the Building BlocksData Wrangling with Swift Control FlowGenerics, Operators, and Nested TypesBeyond the Standard LibraryBuilding iOS Apps with SwiftSwift PlaygroundsServer-Side SwiftPerformance and Responsiveness in SwiftSwiftUI and CombineSwift for Machine Learning

Swift Cookbook

by Cecil Costa

If you are an experienced Objective-C programmer and are looking for quick solutions to many different coding tasks in Swift, then this book is for you. You are expected to have development experience, though not necessarily with Swift.

Swift Data Structure and Algorithms

by Erik Azar Mario Eguiluz Alebicto

Master the most common algorithms and data structures, and learn how to implement them efficiently using the most up-to-date features of Swift 3 About This Book * Develop a deep understanding of the collections in the Swift Standard Library with this step-by-step guide * Develop native Swift data structures and algorithms for use in mobile, desktop, and server-based applications * Learn about performance efficiency between different data structures and algorithms Who This Book Is For This book is for developers who want to learn how to implement and use common data structures and algorithms natively in Swift. Whether you are a self-taught developer without a formal technical background or you have a degree in Computer Science, this book will provide with the knowledge you need to develop advanced data structures and algorithms in Swift using the latest language features. What You Will Learn * Get to know about the basic data structures and how to use the Swift REPL * Use the Swift Standard Library collections bridging to Objective-C collections, and find out about protocol-oriented programming * Find out about Swift generators and sequences, and see how to use them to implement advanced data structures such as Stack, StackList, Queue, and LinkedList * Implement sorting algorithms such as Insertion Sort, Merge Sort, and Quick Sort and understand the performance trade-offs between them * See how to implement various binary trees, B-Tree, and Splay Trees * Perform advanced searching methods using Red-Black trees, AVL trees, and Trie trees, and take a look at several substring search algorithms * Get to know about the data structures used in graphs and how to implement graphs such as depth-first search, breadth-first search, directed graphs, spanning tree, and shortest path * Explore algorithm efficiency and see how to measure it In Detail Apple's Swift language has expressive features that are familiar to those working with modern functional languages, but also provides backward support for Objective-C and Apple's legacy frameworks. These features are attracting many new developers to start creating applications for OS X and iOS using Swift. Designing an application to scale while processing large amounts of data or provide fast and efficient searching can be complex, especially running on mobile devices with limited memory and bandwidth. Learning about best practices and knowing how to select the best data structure and algorithm in Swift is crucial to the success of your application and will help ensure your application is a success. That's what this book will teach you. Starting at the beginning, this book will cover the basic data structures and Swift types, and introduce asymptotic analysis. You'll learn about the standard library collections and bridging between Swift and Objective-C collections. You will see how to implement advanced data structures, sort algorithms, work with trees, advanced searching methods, use graphs, and performance and algorithm efficiency. You'll also see how to choose the perfect algorithm for your problem. Style and approach This easy-to-follow yet comprehensive guide can either be read from beginning to end, or depending on your current knowledge level, you can jump to the specific chapter that interests you. Each chapter topic starts with an introduction to the topic and algorithm before moving on to the hands-on implementation and analysis.

Swift Design Patterns

by Julien Lange

This book is intended for competent Swift developers who want to apply enduring design patterns with Swift to structure and scale their application code.

Swift Development for the Apple Watch: An Intro to the WatchKit Framework, Glances, and Notifications

by Paris Buttfield-Addison Jon Manning

Apple Watch is the sort of science-fiction gadget that people used to dream about as kids. What kinds of apps do you envision for this new device? If you’re comfortable using OS X, Xcode, and iOS—and familiar with Swift—this concise book shows you the basics of building your own apps for this wrist-mounted computer with Apple’s WatchKit framework.You’ll learn what an Apple Watch is, what it isn’t, and how and why people might interact with apps you build for it. This practical guide also examines the type of apps most suitable for this device, and shows you how to be a good citizen in the iOS/Watch ecosystem.Learn the Watch app lifecycle, and understand how these apps interact with the user’s iPhoneBuild a Watch app and its iOS counterpart by adding controls, working with multiple screens, and sharing dataDesign a simple glance, the non-interactive Watch component that provides quick-look informationAdd functionality to the notification system, including actionable items, and display them on the Watch faceDesign and build complications, Watch-face gadgets that can display quick snapshots of information, including future events with Time Travel

Swift Development with Cocoa: Developing for the Mac and iOS App Stores

by Paris Buttfield-Addison Jonathon Manning Tim Nugent

Ready to build apps for iPhone, iPad, and Mac now that Swift has landed? If you’re an experienced programmer who’s never touched Apple developer tools, this hands-on book shows you how to use the Swift language to make incredible iOS and OS X apps, using Cocoa and Cocoa Touch.Learn how to use Swift in a wide range of real-world situations, with Cocoa features such as Event Kit and Core Animation. You’ll pick up Swift language features and syntax along the way, and understand why using Swift (instead of Objective-C) makes iOS and Mac app development easier, faster, and safer. You’ll also work with several exercises to help you practice as you learn.Learn the OS X and iOS application lifecycleUse storyboards to design adaptive interfacesExplore graphics systems, including the built-in 2D and 3D game frameworksDisplay video and audio with AVFoundationStore data locally with the file system, or on the network with iCloudDisplay lists or collections of data with table views and collection viewsBuild apps that let users create, edit, and work with documentsUse MapKit, Core Location, and Core Motion to interact with the world

Swift Essentials

by Dr Alex Blewitt

Whether you are a seasoned Objective-C developer or new to the Xcode platform, Swift Essentials will provide you with all you need to know to get started with the language. Prior experience with iOS development is not necessary, but will be helpful to get the most out of the book.

Swift Essentials - Second Edition

by Dr Alex Blewitt

Are you interested in learning Swift? Do you want to write iOS applications in Swift? If yes, then this is the book for you. No prior iOS programming experience is assumed; however, having some experience with any programming language will be beneficial.

Swift For Dummies

by Jesse Feiler

Get up and running with Swift--swiftly Brimming with expert advice and easy-to-follow instructions, Swift For Dummies shows new and existing programmers how to quickly port existing Objective-C applications into Swift and get into the swing of the new language like a pro. Designed from the ground up to be a simpler programming language, it's never been easier to get started creating apps for the iPhone or iPad, or applications for Mac OS X. Inside the book, you'll find out how to set up Xcode for a new Swift application, use operators, objects, and data types, and control program flow with conditional statements. You'll also get the scoop on creating new functions, statements, and declarations, learn useful patterns in an object-oriented environment, and take advantage of frameworks to speed your coding along. Plus, you'll find out how Swift does away with pointer variables and how to reference and dereference variables instead. Set up a playground development environment for Mac, iPhone, iPad, and wearable computers Move an existing Objective-C program to Swift Take advantage of framework components and subcomponents Create an app that uses location, mapping, and social media Whether you're an existing Objective-C programmer looking to port your code to Swift or you've never programmed for Apple in the past, this fun and friendly guide gets you up to speed swiftly.

Swift Functional Programming - Second Edition

by Fatih Nayebi

Bring the power of functional programming to Swift to develop clean, smart, scalable and reliable applications. About This Book • Written for the latest version of Swift, this is a comprehensive guide that introduces iOS, Web and macOS developers to the all-new world of functional programming that has so far been alien to them • Get familiar with using functional programming alongside existing OOP techniques so you can get the best of both worlds and develop clean, robust, and scalable code • Develop a case study on example backend API with Swift and Vapor Framework and an iOS application with Functional Programming, Protocol-Oriented Programming, Functional Reactive Programming, and Object-Oriented Programming techniques Who This Book Is For Meant for a reader who knows object-oriented programming, has some experience with Objective-C/Swift programming languages and wants to further enhance his skills with functional programming techniques with Swift 3.x. What You Will Learn • Understand what functional programming is and why it matters • Understand custom operators, function composition, currying, recursion, and memoization • Explore algebraic data types, pattern matching, generics, associated type protocols, and type erasure • Get acquainted with higher-kinded types and higher-order functions using practical examples • Get familiar with functional and non-functional ways to deal with optionals • Make use of functional data structures such as semigroup, monoid, binary search tree, linked list, stack, and lazy list • Understand the importance of immutability, copy constructors, and lenses • Develop a backend API with Vapor • Create an iOS app by combining FP, OOP, FRP, and POP paradigms In Detail Swift is a multi-paradigm programming language enabling you to tackle different problems in various ways. Understanding each paradigm and knowing when and how to utilize and combine them can lead to a better code base. Functional programming (FP) is an important paradigm that empowers us with declarative development and makes applications more suitable for testing, as well as performant and elegant. This book aims to simplify the FP paradigms, making them easily understandable and usable, by showing you how to solve many of your day-to-day development problems using Swift FP. It starts with the basics of FP, and you will go through all the core concepts of Swift and the building blocks of FP. You will also go through important aspects, such as function composition and currying, custom operator definition, monads, functors, applicative functors,memoization, lenses, algebraic data types, type erasure, functional data structures, functional reactive programming (FRP), and protocol-oriented programming(POP). You will then learn to combine those techniques to develop a fully functional iOS application from scratch Style and approach An easy-to-follow guide that is full of hands-on coding examples of real-world applications. Each topic is explained sequentially and placed in context, and for the more inquisitive, there are more details of the concepts used. It introduces the Swift language basics and functional programming techniques in simple, non-mathematical vocabulary with examples in Swift.

Swift Game Development: Learn iOS 12 game development using SpriteKit, SceneKit and ARKit 2.0, 3rd Edition

by Siddharth Shekar Stephen Haney

Embrace the mobile gaming revolution by creating popular iOS games with Swift 4.2Key FeaturesLearn to create games for iPhone and iPad with the latest Swift Programming languageUnderstand the fundamental concepts of game development like game physics, camera action, sprites, controls, among othersBuild Augmented reality games using ARKit for true performanceBook DescriptionSwift is the perfect choice for game development. Developers are intrigued by Swift and want to make use of new features to develop their best games yet. Packed with best practices and easy-to-use examples, this book leads you step by step through the development of your first Swift game.The book starts by introducing Swift's best features – including its new ones for game development. Using SpriteKit, you will learn how to animate sprites and textures. Along the way, you will master physics, animations, and collision effects and how to build the UI aspects of a game. You will then work on creating a 3D game using the SceneKit framework. Further, we will look at how to add monetization and integrate Game Center. With iOS 12, we see the introduction of ARKit 2.0. This new version allows us to integrate shared experiences such as multiplayer augmented reality and persistent AR that is tied to a specific location so that the same information can be replicated on all connected devices. In the next section, we will dive into creating Augmented Reality games using SpriteKit and SceneKit. Then, finally, we will see how to create a Multipeer AR project to connect two devices, and send and receive data back and forth between those devices in real time.By the end of this book, you will be able to create your own iOS games using Swift and publish them on the iOS App Store.What you will learnDeliver powerful graphics, physics, and sound in your game by using SpriteKit and SceneKitSet up a scene using the new capabilities of the scene editor and custom classesMaximize gameplay with little-known tips and strategies for fun, repeatable actionMake use of animations, graphics, and particles to polish your gameUnderstand the current mobile monetization landscapeIntegrate your game with Game CenterDevelop 2D and 3D Augmented Reality games using Apple's new ARKit frameworkPublish your game to the App StoreWho this book is forIf you wish to create and publish iOS games using Swift, then this book is for you. No prior game development or experience with Apple ecosystem is needed.

Swift Game Programming for Absolute Beginners

by Arjan Egges

Swift Game Programming for Absolute Beginners teaches Apple''s Swift language in the context of four, fun and colorful games. Learn the Swift 2. 0 language, and learn to create game apps for iOS at the same time - a double win! The four games you''ll develop while reading this book are: Painter Tut''s Tomb Penguin Pairs Tick Tick These four games are casual, arcade-style games representing the aim-and-shoot, casual, puzzle, and platform styles of game play. Professionally developed game assets form part of the book download. You''ll get professionally drawn sprites and imagery that''ll have you proud to show your learning to friends and family. The approach in Swift Game Programming for Absolute Beginners follows the structure of a game rather than the syntax of a language. You''ll learn to create game worlds, manage game objects and game states, define levels for players to pass through, implement animations based upon realistic physics, and much more. Along the way you''ll learn the language, but always in the context of fun and games. Swift is Apple''s new programming language introduced in 2014 to replace Objective-C as the main programming language for iOS devices and Mac OS X. Swift is a must learn language for anyone targeting Apple devices, and Swift Game Programming for Absolute Beginners provides the most fun you''ll ever have in stepping over the threshold toward eventual mastery of the language. What you''ll learn Write applications in possibly the most important new language of the decade Create games to run on Apple devices such as phones and tablets, and desktops too Create and manage game worlds having multiple levels through which players progress React to player input whether from mouse, keyboard, or touch Achieve realistic movement of game objects through applied physics Prepare your games properly for commercial deployment Who this book is for Swift Game Programming for Absolute Beginners is for programmers and technology enthusiasts wanting to learn to program and develop applications for Apple devices such as phones and tablets. The book is also for anyone wanting to learn to program in Apple''s new language named Swift. No prior knowledge of Swift is assumed. Swift Game Programming for Absolute Beginners teaches the Swift language from scratch in the context of creating a series of fun and colorful games that you''ll be proud to develop and show to your friends, neighbors, and colleagues. Table of Contents Part I: Getting Started 1. The Swift Language 2. Game Programming Basics 3. Creating a Game World 4. Game Assets Part II: Painter 5. Knowing What the Player is Doing 6. Reacting to Player Input 7. Basic Game Objects 8. Game Object Types 9. Colors and Collisions 10. Limited Lives 11. Organizing Game Objects 12. Finishing the Painter Game Part III: Galactic Waste 13. Adapting to Different Devices 14. Game Object Hierarchies 15. Game Physics 16. Game Object Interaction 17. Finishing the Galactic Waste Game Part IV: Penguin Pairs 18. Sprite Sheets 19. Storing and Recalling Game Data 20. Pairing the Penguins 21. Finishing the Penguin Pairs Game 22. The Main Game Structure 23. Animation Part V: Tick Tick 24. Platform Game Physics 25. Intelligent Enemies 26. Adding Player Interaction 27. Finishing the Tick Tick Game

Swift High Performance

by Kostiantyn Koval

Leverage Swift and enhance your code to take your applications to the next levelAbout This BookBuild solid, high performance applications in SwiftIncrease your efficiency by getting to grips with concurrency and parallel programmingUse Swift to design performance-oriented solutionsWho This Book Is ForThis book is aimed at experienced Swift developers wanting to optimize their programs on Apple platforms to optimize application performance.What You Will LearnBuild solid, stable, and reliable applications using SwiftUse REPL and Pl to manage and configure relational databasesExplore Swift's features including its static type system, value objects, and functional programming Design reusable code for high performance in SwiftUse to Xcode LLBD and REPL to debug commandsAvoid sharing resources by using concurrency and parallel programmingUnderstand the lazy loading pattern, lazy sequences, and lazy evolution.In DetailSwift is one of the most popular and powerful programming languages for building iOS and Mac OS applications, and continues to evolve with new features and capabilities. Swift is considered a replacement to Objective-C and has performance advantages over Objective-C and Python. Swift adopts safe programming patterns and adds modern features to make programming easier, more flexible, and more fun.Develop Swift and discover best practices that allow you to build solid applications and optimize their performance.First, a few of performance characteristics of Swift will be explained. You will implement new tools available in Swift, including Playgrounds and REPL. These will improve your code efficiency, enable you to analyse Swift code, and enhance performance. Next, the importance of building solid applications using multithreading concurrency and multi-core device architecture is covered, before moving on to best practices and techniques that you should utilize when building high performance applications, such as concurrency and lazy-loading. Finally, you will explore the underlying structure of Swift further, and learn how to disassemble and compile Swift code.Style and approachThis is a comprehensive guide to enhancing Swift programming techniques and methodology to enable faster application development.

Swift OS X Programming for Absolute Beginners

by Wallace Wang

Swift OS X Programming for Absolute Beginners is your step-by-step guide to learning how to code using Swift, Apple's hottest new programming language. This book will not only teach complete programming novices how to write OS X programs, but it can also help experienced programmers moving to the Macintosh for the first time. You will learn to understand the principles of programming, how to use Swift and Xcode, and how to combine your knowledge into writing OS X programs. If you've always wanted to learn coding but felt stymied by the limitation of simplistic programming languages or intimidated by professional but complicated programming languages, then you'll want to learn Swift. Swift is your gateway to both Macintosh and iOS app development while being powerful and easy to learn at the same time, and Swift OS X Programming for Absolute Beginners is the perfect place to start - add it to your library today. What you'll learn The basic principles of object-oriented programming without the complicated clutter of traditional programming language syntax How to use Xcode, the main programming tool used for both OS X and iOS development What makes Swift unique and powerful as a programming language and why you should learn it How to create OS X programs using Swift and Xcode User interfaces principles that follow Apple's Human Interface Guidelines Who this book is for Swift OS X Programming for Absolute Beginners is for teaching novices programming and teaching experienced programmers from other environments how to use Xcode on the Macintosh. Since OS X programming is far easier than iOS development, readers can master Swift and Xcode faster to gain more confidence. Swift OS X Programming for Absolute Beginners is perfect for people who want to learn programming for the first time and for programmers wanting to learn Xcode and the Macintosh for the first time. Table of Contents Chapter 1: Understanding Programming Chapter 2: Getting to Know Xcode Chapter 3: The Basic Steps to Creating a Mac program Chapter 4: Getting Help Chapter 5: Learning Swift Chapter 6: Manipulating Numbers and Strings Chapter 7: Making Decisions with Branches Chapter 8: Repeating Code with Loops Chapter 9: Arrays and Dictionaries Chapter 10: Tuples, Sets, and Structures Chapter 11: Creating Classes and Objects Chapter 12: Inheritance, Method Overriding, Extensions, Protocols, and Delegates Chapter 13: Creating a User interface Chapter 14: Choosing Commands with Buttons Chapter 15: Making Choices with Radio Buttons and Check Boxes Chapter 16: Making Choices with Pop-Up Menus Chapter 17: Inputting and Outputting Text with Labels, Text Fields, and Combo Boxes Chapter 18: Using Built-in Dialog Boxes Chapter 19: Creating Pull-Down Menus Chapter 20: Working with Views and Storyboards Chapter 21: Working with Table and Collection Views Chapter 22: Storing Information Chapter 23: Debugging a Program Chapter 24: Designing Your Own Programs

Swift Pocket Reference

by Anthony Gray

Get quick answers for developing and debugging applications with Swift, Apple's multi-paradigm programming language. This pocket reference is the perfect on-the-job tool for learning Swift's modern language features, including type safety, generics, type inference, closures, tuples, automatic memory management, and support for Unicode.Designed to work with Cocoa and Cocoa Touch, Swift can be used in tandem with Objective-C, and either of these languages can call APIs implemented in the other. Swift is still evolving, but it's clear that Apple sees it as the future language of choice for iOS and OS X software development.Topics include:Swift's Run-Eval-Print-Loop (REPL) and interactive playgroundsSupported data types, such as strings, arrays, and dictionariesVariables and constantsProgram flow: loops and conditional executionClasses, structures, enumerations, functions, and protocolsClosures: similar to blocks in Objective-C and lambdas in C#Optionals: values that can explicitly have no valueOperators, operator overloading, and custom operatorsAccess control: restricting access to types, methods, and propertiesBuilt-in global functions and their parameter requirements

Swift Protocol-Oriented Programming: Increase productivity and build faster applications with Swift 5, 4th Edition

by Jon Hoffman

Embrace the Protocol-Oriented Programming paradigm, for better code maintainability and increased performance, with Swift programming. Key Features Leverage the power of Protocol-Oriented Programming in your applications Leverage generics to create very flexible frameworks Learn how to implement common design patterns in a protocol-oriented way Book Description Protocol-oriented programming is an incredibly powerful concept at the heart of Swift's design. Swift's standard library was developed using POP techniques, generics, and first-class value semantics; therefore, it is important for every Swift developer to understand these core concepts and take advantage of them. The fourth edition of this book is improved and updated to the latest version of the Swift programming language. This book will help you understand what protocol-oriented programming is all about and how it is different from other programming paradigms such as object-oriented programming. This book covers topics such as generics, Copy-On-Write, extensions, and of course protocols. It also demonstrates how to use protocol-oriented programming techniques via real-world use cases. By the end of this book, you will know how to use protocol-oriented programming techniques to build powerful and practical applications. What you will learn Learn the differences between object-oriented programming and protocol-oriented programming Understand why value types should be prioritized over reference types Delve into protocols, protocol inheritance, protocol composition, and protocol extensions Learn how to implement COW (Copy-On-Write) within your custom value types Understand how memory management works in Swift and how to avoid common pitfalls Design applications by starting with the protocol rather than the implementation Who this book is for This book is intended for Swift developers who have, at minimum an introductory knowledge of the Swift programming language and would like to understand how they can use Protocol-Oriented Programming techniques in their applications.

Swift Recipes for iOS Developers: Real-Life Code from App Store Apps

by Alexander Nekrasov

Boost your iOS developer career by learning from real-life examples and start writing code for one of the most successful platforms ever. No matter if you’re an experienced developer or just a beginner, you’ll find something new and something useful for your future projects here. All of the recipes in this book are taken from real-life commercial projects that have been approved by Apple and published on the App Store. You won’t write “Hello, world!” and similar programs. Instead you'll see how to parse different data formats; run JavaScript code right inside your iOS app; and enhance storyboard editor with several simple extensions. You’ll make beautiful modern-looking dialogs with blurs, shadows and rounded corners using only a few lines of code, and safely convert data after analyzing text strings. Go on to animate your layout and get your app shored up to crash as little as possible Each recipe offers a code snippet to copy and paste to your project as a tool to boost your knowledge, as well as, create plug-and-play features. Each of recipe shows the description for each line of code while explaining the logic of it, contains references to documentation, and gives you an opportunity to modify or write something similar that fits your project better. A good piece of code should not work but also be short, clear, and stable. And that combo will be our priority in these code recipes. Well-written code snippets must run in any environment and be easily transferrable from one project to another. Most of the provided recipes will migrate from one project to another with little to no changes at all, and with years of real-world application have proven themselves to be useful and stable. Dive into the world of iOS development and write clear, functioning, and safe Swift code! What You'll LearnParse, convert, and print Swift data Develop stunning UIs quickly Write effective and portable Swift extensions Make your code cleaner and safer Who This Book Is ForBeginners in iOS development who want to improve their skills with real-life examples. Developers switching to mobile development from other areas. All iOS developers looking for code recipes.

Swift Style: An Opinionated Guide to an Opinionated Language

by Erica Sadun

Discover the do's and don'ts involved in crafting readable Swift code as you explore common Swift coding challenges and the best practices that address them. From spacing, bracing, and semicolons to proper API style, discover the whys behind each recommendation, and add to or establish your own house style guidelines. This practical, powerful, and opinionated guide offers the best practices you need to know to work successfully in this equally opinionated programming language. Apple's Swift programming language has finally reached stability, and developers are demanding to know how to program the language properly. Swift Style guides you through the ins and outs of Swift programming best practices. This is the first best practices book for serious, professional Swift programmers and for programmers who want to shine their skills to be hired in this demanding market. A style guide offers a consistent experience of well-crafted code that lets you focus on the code's underlying meaning, intent, and implementation. This book doesn't offer canonical answers on Swift coding style. It explores the areas of Swift where structure comes into play. Whether you're developing a personal style or a house style, there are always ways to enhance your code choices. You'll find here the ideas and principles to establish or enhance your own best style practices. Begin with simple syntactical styling. Strengthen code bracing for easy readability. Style your closures for safety and resilience. Perfect spacing and layout. Master literal initialization and typing. Optimize control flow layout and improve conditional style choices. Transition from Objective-C and move code into Swift the right way. Boost API design using proper naming and labeling. Elevate defaulted arguments and variadics to their right places. Finally, Erica offers her own broad recommendations on good coding practice. What You Need: Recent version of the Swift programming language

Swift by Example

by Giordano Scalzo

This book is intended for those who want to learn to develop apps in Swift the right way. Whether you are an expert Objective-C programmer or new to this platform, you'll learn quickly, grasping the code of real-world apps to use Swift effectively. Prior experience in development for Apple devices would be helpful, but is not mandatory.

Swift for Absolute Beginners

by Gary Bennett Brad Lees

The professional development team that brought you two editions of Objective-C for the Absolute Beginners and have taught thousands of developers around the world to write some of the most popular iPhone apps in their categories on the app store, have now leveraged their instruction for Swift. Swift for Absolute Beginners is perfect for those with no programming background, those with some programming experience but no object-oriented experience, or those that have a great idea for an app but haven't programmed since school. Gary Bennett and Brad Lees are full-time professional iOS developers and have developed a broad spectrum of apps for Fortune 500 companies. The authors have taken their combined 12 years of writing apps, teaching online iOS courses, the experience from their first two iOS books, along with their free online instruction and free online forum to create an excellent training book. Topics include: How to be successful at learning SwiftUsing Swift Playgrounds to learn iOS development quicklyWhat is Object Oriented ProgrammingWhat are Swift classes, properties, and functionsProper user interface and user experience designSwift data types: integers, floats, strings, booleansHow to use Swift data collections: arrays and dictionariesBoolean logic, comparing data, and flow controlWriting iPhone apps from scratchAvoiding Swift pitfallsMany students have a difficult time believing they can learn to write iOS apps or just staying motivated through learning the process. This book, along with the free, live online training sessions, helps students stay motivated and overcome obstacles while they learn to be great iOS developers.

Swift iOS 24-Hour Trainer

by Abhishek Mishra

Jump into the app development world with confidence! iOS Swift 24-Hour Trainer combines book and video lessons in Apple's Swift programming language to prepare you to build iPhone and iPad apps--and distribute them through the Appstore. First, this approachable text covers the fundamentals of Swift by introducing you to iOS development in this language, and presenting best practices for setting up a development environment and using variables, statements, expressions, operators, functions, and closures. Next, you explore common tasks, such as alert views, table views, and collection views. You then deepen your knowledge of Swift by considering network programming and local data storage. Finally, this engaging resource dives into slightly more advanced concepts, such as tab bars, web views, the accelerometer, camera, photo library, Google maps, and core location. Swift was designed by Apple to incorporate modern scripting features while offering simpler, cleaner syntax than Objective-C to maintain a minimal and easy to read style. This more expressive code offers numerous key features, such as closures unified with function pointers, tuples and multiple value returns, generics, and functional programming patterns. Learn how to obtain a device UDID Test your applications on an actual device, so you can see your work in action Distribute your applications outside of the App store, allowing you to test your work with real users Review common reasons why apps are rejected by Apple to strengthen your case when submitting your apps for distribution iOS Swift 24-Hour Trainer is an essential guide to Apple's Swift programming language for beginning programmers.

Swift iOS Programming for Kids

by Jim Campagno Steffen D. Sommer

Unleash your child's developer potential through fun projects and help them learn how to create iOS apps in Swift About This Book • Children can express their creativity while learning through interactive Swift Playgrounds • Empower children to think critically about problems • Learning programming basics can help children gain confidence in problem solving • Help children put their imagination into action building their first iOS app Who This Book Is For Children who are curious about the technology we use in our daily lives and want to know how it works can use this book to learn about programming and building their first iOS app. No prior programming experience is necessary. What You Will Learn • Basic programming and coding fundamentals • Write code using the fun and interactive Swift Playgrounds app • Make animations, including creating your own starry night • Utilise functions by making pizza in code • Create an interactive toy bin • Learn how to use control flow statements to further enhance your toy bin • Build a simple movie night app working with tableviews and arrays In Detail This book starts at the beginning by introducing programming through easy to use examples with the Swift Playgrounds app. Kids are regularly encouraged to explore and play with new concepts to support knowledge acquisition and retention – these newly learned skills can then be used to express their own unique ideas. Children will be shown how to create their first iOS application and build their very own movie night application. Style and approach This is a project-based guide with an engaging tone that uses a visually rich format. It explains the concepts in clear language and uses lots of pictures, cartoons, and examples. There is a set of practical exercises to be completed.

Swift in Depth

by Tjeerd in 't Veen

Summary Now updated for Swift 5! Swift is more than just a fun language to build iOS applications with. It features a host of powerful tools that, if effectively used, can help you create even better apps with clean, crystal-clear code and awesome features. Swift in Depth is designed to help you unlock these tools and quirks and get developing next-gen apps, web services, and more! Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the Technology It's fun to create your first toy iOS or Mac app in Swift. Writing secure, reliable, professional-grade software is a different animal altogether. The Swift language includes an amazing set of high-powered features, and it supports a wide range of programming styles and techniques. You just have to roll up your sleeves and learn Swift in depth. About the Book Swift in Depth guides you concept by concept through the skills you need to build professional software for Apple platforms, such as iOS and Mac; also on the server with Linux. By following the numerous concrete examples, enlightening explanations, and engaging exercises, you'll finally grok powerful techniques like generics, efficient error handling, protocol-oriented programming, and advanced Swift patterns. Author Tjeerd in 't Veen reveals the high-value, difficult-to-discover Swift techniques he's learned through his own hard-won experience. What's inside Covers Swift 5 Writing reusable code with generics Iterators, sequences, and collections Protocol-oriented programming Understanding map, flatMap, and compactMap Asynchronous error handling with ResultBest practices in Swift About the Reader Written for advanced-beginner and intermediate-level Swift programmers. About the Author Tjeerd in 't Veen is a senior software engineer and architect in the mobile division of a large international banking firm. Table of Contents Introducing Swift in depth Modeling data with enums Writing cleaner properties Making optionals second nature Demystifying initializers Effortless error handling Generics Putting the pro in protocol-oriented programming Iterators, sequences, and collections Understanding map, flatMap, and compactMap Asynchronous error handling with Result Protocol extensions Swift patterns Delivering quality Swift code Where to Swift from here

Refine Search

Showing 52,851 through 52,875 of 61,781 results