Muutke küpsiste eelistusi

E-raamat: Swift Recipes: A Problem-Solution Approach

  • Formaat: PDF+DRM
  • Ilmumisaeg: 11-Jul-2015
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484204184
Teised raamatud teemal:
  • Formaat - PDF+DRM
  • Hind: 28,39 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: PDF+DRM
  • Ilmumisaeg: 11-Jul-2015
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484204184
Teised raamatud teemal:

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Swift Recipes provides a problem solution approach for dealing with key aspects of the Swift programming language (covering version 1.2), ensuring you have the indispensable reference you need to successfully execute common programming tasks. You’ll learn how to use the unique features of the Swift programming language as well as its use with Cocoa and Cocoa touch frameworks and libraries.

Solutions are available for a range of problems, including application development with Xcode; working with strings, numbers, and object collections; dealing with threads, multi-core processing, and asynchronous processing; and building applications that take advantage of dates and timers and memory management.

This book is an essential core reference for every Swift programmer and offers solutions in a concise and easy-to-follow manner. T. Michael Rogers has developed iOS applications for Fortune 100 brands and startups, and has trained new and experienced iOS developers via the iOS Boot Camp in New York City, online courses, and in private settings. He brings his expertise to offer you the ability to use and exploit Swift to get the most out of all your projects for your app creations, whether you use iOS or Mac OS X.

About the Author xxvii
About the Technical Reviewer xxix
Acknowledgments xxxi
Introduction xxxiii
Chapter 1 Swift Programming
1(26)
1-1 Getting Started with Swift
2(1)
Problem
2(1)
Solution
2(1)
1-2 Installing Xcode 6
3(1)
Problem
3(1)
Solution
3(1)
How It Works
3(1)
1-3 Working with Playgrounds
4(1)
Problem
4(1)
Solution
4(1)
How It Works
4(1)
The Code and Usage
5(1)
1-4 Designing User Interface Elements in a Storyboard
6(1)
Problem
6(1)
Solution
6(1)
How It Works
6(1)
The Code and Usage
7(1)
1-5 Dealing with Strings
8(1)
Problem
8(1)
Solution
8(1)
How It Works
8(1)
The Code and Usage
9(1)
1-6 Formatting Numbers as Strings
10(1)
Problem
10(1)
Solution
10(1)
How It Works
10(1)
The Code and Usage
10(1)
1-7 Getting the Length of a Swift String
11(1)
Problem
11(1)
Solution
11(1)
How It Works
11(1)
The Code and Usage
11(1)
1-8 Manipulating Swift Strings
12(1)
Problem
12(1)
Solution
12(1)
How It Works
12(1)
The Code and Usage
13(1)
1-9 Manipulating Strings with Native Swift Methods
14(1)
Problem
14(1)
Solution
14(1)
How It Works
14(1)
The Code and Usage
15(1)
1-10 Storing Strings on the iOS File System
16(1)
Problem
16(1)
Solution
16(1)
How It Works
17(1)
The Code and Usage
17(2)
1-11 Reading a Text File into a String
19(1)
Problem
19(1)
Solution
19(1)
How It Works
19(1)
The Code and Usage
20(1)
1-12 Reading and Writing Text Files in Cocoa
21(1)
Problem
21(1)
Solution
21(1)
How It Works
21(1)
The Code and Usage
22(1)
1-13 Dealing with Numbers
23(1)
Problem
23(1)
Solution
23(1)
How It Works
24(1)
The Code and Usage
24(1)
1-14 Dealing with Dates
24(1)
Problem
24(1)
Solution
24(1)
How It Works
24(1)
The Code and Usage
25(2)
Chapter 2 Complex Types
27(24)
2-1 Writing Functions
28(1)
Problem
28(1)
Solution
28(1)
How It Works
28(1)
The Code and Usage
29(1)
2-2 Creating Classes
29(1)
Problem
29(1)
Solution
29(1)
How It Works
29(1)
The Code and Usage
30(1)
2-3 Adding Class Properties
30(1)
Problem
30(1)
Solution
30(1)
How It Works
30(1)
The Code and Usage
31(1)
2-4 Initializing Class Properties
32(1)
Problem
32(1)
Solution
32(1)
How It Works
32(1)
The Code and Usage
33(1)
2-5 Adding Class Methods
34(1)
Problem
34(1)
Solution
34(1)
How It Works
34(1)
The Code and Usage
35(1)
2-6 Inheriting from Classes
36(1)
Problem
36(1)
Solution
36(1)
How It Works
36(2)
The Code and Usage
38(1)
2-7 Implementing Protocols
39(1)
Problem
39(1)
Solution
39(1)
How It Works
39(1)
The Code and Usage
40(1)
2-8 Setting Property Observers
41(1)
Problem
41(1)
Solution
41(1)
How It Works
41(1)
The Code and Usage
42(1)
2-9 Defining Enumerations
43(1)
Problem
43(1)
Solution
43(1)
How It Works
43(3)
The Code and Usage
46(1)
2-10 Creating Structures
47(1)
Problem
47(1)
Solution
47(1)
How It Works
47(1)
The Code and Usage
48(1)
2-11 Using Tuples
49(1)
Problem
49(1)
Solution
49(1)
How It Works
49(1)
The Code and Usage
50(1)
Chapter 3 Collections
51(28)
3-1 Creating an Array
52(1)
Problem
52(1)
Solution
52(1)
How It Works
52(1)
The Code and Usage
53(1)
3-2 Counting the Number of Items in an Array
53(1)
Problem
53(1)
Solution
53(1)
How It Works
53(1)
The Code and Usage
54(1)
3-3 Managing Items in an Array
54(1)
Problem
54(1)
Solution
54(1)
How It Works
54(1)
The Code and Usage
55(1)
3-4 Searching for Items in an Array
55(1)
Problem
55(1)
Solution
56(1)
How It Works
56(1)
The Code and Usage
57(1)
3-5 Sorting an Array
58(1)
Problem
58(1)
Solution
58(1)
How It Works
58(1)
The Code and Usage
59(1)
3-6 Replacing a Range of Values in an Array
60(1)
Problem
60(1)
Solution
60(1)
How It Works
60(1)
The Code and Usage
60(1)
3-7 Iterating Over an Array
61(1)
Problem
61(1)
Solution
61(1)
How It Works
61(1)
The Code and Usage
62(1)
3-8 Saving an Array to the File System
62(1)
Problem
62(1)
Solution
62(1)
How It Works
62(1)
The Code and Usage
63(1)
3-9 Populating an Array with the Contents of a plist File
64(1)
Problem
64(1)
Solution
64(1)
How It Works
64(1)
The Code and Usage
65(1)
3-10 Using Subscripts
66(1)
Problem
66(1)
Solution
66(1)
How It Works
66(1)
The Code and Usage
67(1)
3-11 Creating a Dictionary
68(1)
Problem
68(1)
Solution
68(1)
How It Works
68(1)
The Code and Usage
68(1)
3-12 Managing Items in a Dictionary
69(1)
Problem
69(1)
Solution
69(1)
How It Works
69(1)
The Code and Usage
70(1)
3-13 Implementing the Hashable Protocol
70(1)
Problem
70(1)
Solution
70(1)
How It Works
70(1)
The Code and Usage
71(1)
3-14 Iterating Through Items in a Dictionary
72(1)
Problem
72(1)
Solution
72(1)
How It Works
72(1)
The Code and Usage
73(1)
3-15 Saving a Dictionary to the File System
74(1)
Problem
74(1)
Solution
74(1)
How It Works
74(1)
The Code and Usage
75(1)
3-16 Populating a Dictionary with the Contents of a Property List File
76(1)
Problem
76(1)
Solution
76(1)
How It Works
76(1)
The Code and Usage
77(2)
Chapter 4 Advanced Swift Programming
79(28)
4-1 Writing Closures
79(1)
Problem
80(1)
Solution
80(1)
How It Works
80(1)
The Code and Usage
80(1)
4-2 Writing Trailing Closures
81(1)
Problem
81(1)
Solution
81(1)
How It Works
81(1)
The Code and Usage
82(1)
4-3 Overloading the Equality Operator
82(1)
Problem
82(1)
Solution
82(1)
How It Works
83(1)
The Code and Usage
83(1)
4-4 Checking for Reference Equality
84(1)
Problem
84(1)
Solution
84(1)
How It Works
84(1)
The Code and Usage
84(1)
4-5 Implementing Generic Functions
85(1)
Problem
85(1)
Solution
85(1)
How It Works
86(1)
The Code and Usage
86(1)
4-6 Implementing Generic Classes
87(1)
Problem
87(1)
Solution
87(1)
How It Works
87(1)
The Code and Usage
88(1)
4-7 Working with Local Dates and Times
89(1)
Problem
89(1)
Solution
89(1)
How It Works
89(1)
The Code and Usage
90(2)
4-8 Creating a Unit Test Project
92(1)
Problem
92(1)
Solution
92(1)
How It Works
92(1)
The Code and Usage
92(2)
4-9 Writing a Unit Test
94(1)
Problem
94(1)
Solution
94(1)
How It Works
94(2)
The Code and Usage
96(2)
4-10 Performance Testing with XCTest
98(1)
Problem
98(1)
Solution
98(1)
How It Works
98(1)
The Code and Usage
98(1)
4-11 Creating Mock Objects for Testing
99(1)
Problem
100(1)
Solution
100(1)
How It Works
100(1)
The Code and Usage
100(2)
4-12 Testing Asynchronous Code
102(1)
Problem
102(1)
Solution
102(1)
How It Works
103(1)
The Code and Usage
104(3)
Chapter 5 iOS Applications
107(36)
5-1 Creating a New iOS Application
107(1)
Problem
107(1)
Solution
107(1)
How It Works
108(1)
5-2 Adding a UILabel to a View
109(1)
Problem
109(1)
Solution
109(1)
How It Works
109(1)
The Code and Usage
110(1)
5-3 Adding a UIButton to a View
111(1)
Problem
111(1)
Solution
111(1)
How It Works
111(2)
The Code and Usage
113(1)
5-4 Adding a UITextField to a View
114(1)
Problem
114(1)
Solution
114(1)
How It Works
114(1)
The Code and Usage
115(1)
5-5 Positioning UIViews in Auto Layout Using NSConstraints
116(1)
Problem
116(1)
Solution
116(1)
How It Works
117(2)
The Code and Usage
119(2)
5-6 Repositioning a View to Accommodate the Keyboard
121(1)
Problem
121(1)
Solution
121(1)
How It Works
121(4)
The Code and Usage
125(2)
5-7 Displaying an Alert with UIAlertController
127(1)
Problem
127(1)
Solution
127(1)
How It Works
127(2)
The Code and Usage
129(1)
5-8 Using UIAlertController to Collect User Input
130(1)
Problem
130(1)
Solution
130(1)
How It Works
130(2)
The Code and Usage
132(1)
5-9 Creating a UITableView
133(1)
Problem
133(1)
Solution
133(1)
How It Works
133(3)
The Code and Usage
136(2)
5-10 Swiping to Delete an Item from a UITableView
138(1)
Problem
138(1)
Solution
138(1)
How It Works
139(1)
The Code and Usage
140(3)
Chapter 6 OS X Applications
143(36)
6-1 Creating an OS X Application
144(1)
Problem
144(1)
Solution
144(1)
How It Works
144(1)
The Code and Usage
145(1)
6-2 Adding a View to a Window
146(1)
Problem
146(1)
Solution
146(1)
How It Works
146(1)
The Code and Usage
147(1)
6-3 Adding a Menu and Menu Items
148(1)
Problem
148(1)
Solution
148(1)
How It Works
148(2)
The Code and Usage
150(1)
6-4 Adding a Button to a Window
151(1)
Problem
151(1)
Solution
151(1)
How It Works
152(1)
The Code and Usage
153(1)
6-5 Using an NSTextField
154(1)
Problem
154(1)
Solution
154(1)
How It Works
154(1)
The Code and Usage
155(1)
6-6 Displaying an Image in a Window
156(1)
Problem
156(1)
Solution
156(1)
How It Works
156(2)
The Code and Usage
158(1)
6-7 Adjusting Contents When a Window Is Resized
158(1)
Problem
158(1)
Solution
158(1)
How It Works
158(3)
The Code and Usage
161(1)
6-8 Implementing an NSTableView
162(1)
Problem
162(1)
Solution
162(1)
How It Works
163(5)
The Code and Usage
168(2)
6-9 Sorting an NSTableView
170(1)
Problem
170(1)
Solution
170(1)
How It Works
170(4)
The Code and Usage
174(2)
6-10 Handling the Selection of an NSTableView Row
176(1)
Problem
176(1)
Solution
176(1)
How It Works
176(1)
The Code and Usage
177(2)
Chapter 7 Files and Directories
179(20)
7-1 Locating Specialized Directories
180(1)
Problem
180(1)
Solution
180(1)
How It Works
180(2)
The Code and Usage
182(1)
7-2 Checking for the Existence of a File or Directory
182(1)
Problem
182(1)
Solution
182(1)
How It Works
182(1)
The Code and Usage
183(1)
7-3 Copying Files
184(1)
Problem
184(1)
Solution
184(1)
How It Works
185(1)
The Code and Usage
185(1)
7-4 Creating Directories
186(1)
Problem
186(1)
Solution
186(1)
How It Works
187(1)
The Code and Usage
187(1)
7-5 Deleting Files and Directories
188(1)
Problem
188(1)
Solution
188(1)
How It Works
188(1)
The Code and Usage
189(2)
7-6 Getting a List of Files from a Path
191(1)
Problem
191(1)
Solution
191(1)
How It Works
191(1)
The Code and Usage
192(1)
7-7 Archiving Objects to Files
193(1)
Problem
193(1)
Solution
193(1)
How It Works
193(1)
The Code and Usage
194(1)
7-8 Archiving Custom Classes to Files
195(1)
Problem
195(1)
Solution
195(1)
How It Works
195(1)
The Code and Usage
196(3)
Chapter 8 Concurrency
199(26)
8-1 Threading with NSThread
199(1)
Problem
199(1)
Solution
199(1)
How It Works
200(1)
The Code and Usage
201(1)
8-2 Synchronizing Threads
202(1)
Problem
202(1)
Solution
202(1)
How It Works
203(1)
The Code and Usage
203(1)
8-3 Using Grand Central Dispatch for Threading
204(1)
Problem
204(1)
Solution
204(1)
How It Works
205(1)
The Code and Usage
206(1)
8-4 Using NSOperations and NSOperationsQueue
207(1)
Problem
207(1)
Solution
207(1)
How It Works
207(2)
The Code and Usage
209(1)
8-5 Completing Tasks in the Background in iOS
210(1)
Problem
210(1)
Solution
210(1)
How It Works
210(1)
The Code and Usage
211(1)
8-6 Downloading Content in the Background
212(1)
Problem
212(1)
Solution
212(1)
How It Works
212(4)
The Code and Usage
216(2)
8-7 Creating Long-Running Background Tasks
218(1)
Problem
218(1)
Solution
218(1)
How It Works
218(5)
The Code and Usage
223(2)
Chapter 9 Web Services
225(26)
9-1 Parsing JSON
225(1)
Problem
225(1)
Solution
225(1)
How It Works
226(1)
The Code and Usage
227(4)
9-2 Parsing XML
231(1)
Problem
231(1)
Solution
231(1)
How It Works
231(3)
The Code and Usage
234(1)
9-3 Making HTTP Calls
235(1)
Problem
235(1)
Solution
235(1)
How It Works
235(1)
The Code and Usage
236(1)
9-4 Checking for Network Connectivity
237(1)
Problem
237(1)
Solution
237(1)
How It Works
237(1)
The Code and Usage
238(2)
9-5 Calling a REST API
240(1)
Problem
240(1)
Solution
240(1)
How It Works
240(2)
The Code and Usage
242(2)
9-6 Posting Data to a REST API
244(1)
Problem
244(1)
Solution
244(1)
How It Works
244(2)
The Code and Usage
246(5)
Chapter 10 Core Data
251(26)
10-1 Creating a Data Model
252(1)
Problem
252(1)
Solution
252(1)
How It Works
252(2)
10-2 Creating Model Classes
254(1)
Problem
254(1)
Solution
254(1)
How It Works
254(2)
The Code and Usage
256(1)
10-3 Creating a Data Store
257(1)
Problem
257(1)
Solution
257(1)
How It Works
257(3)
The Code and Usage
260(2)
10-4 Creating a Managed Object Context
262(1)
Problem
262(1)
Solution
262(1)
How It Works
262(1)
The Code and Usage
263(1)
10-5 Adding a New Entity
264(1)
Problem
264(1)
Solution
264(1)
How It Works
264(1)
The Code and Usage
265(1)
10-6 Creating an NSFetchRequest
266(1)
Problem
266(1)
Solution
266(1)
How It Works
266(1)
The Code and Usage
267(1)
10-7 Populating a UITableView with a Fetched Results Controller
268(1)
Problem
268(1)
Solution
268(1)
How It Works
268(3)
The Code and Usage
271(2)
10-8 Deleting an Item
273(1)
Problem
273(1)
Solution
273(1)
How It Works
273(1)
The Code and Usage
274(1)
10-9 Searching for Entities
275(1)
Problem
275(1)
Solution
275(1)
How It Works
275(1)
The Code and Usage
275(2)
Chapter 11 Advanced iOS 8 Features
277(26)
11-1 Creating a Today Extension
277(1)
Problem
277(1)
Solution
277(1)
How It Works
277(4)
The Code and Usage
281(2)
11-2 Creating a Custom Keyboard Extension
283(1)
Problem
283(1)
Solution
283(1)
How It Works
283(3)
The Code and Usage
286(1)
11-3 Creating a Sharing Extension
287(1)
Problem
287(1)
Solution
287(1)
How It Works
287(5)
The Code and Usage
292(2)
11-4 Creating an Action Extension
294(1)
Problem
294(1)
Solution
294(1)
How It Works
294(3)
The Code and Usage
297(2)
11-5 Creating a WatchKit Application
299(1)
Problem
299(1)
Solution
299(1)
How It Works
299(2)
The Code and Usage
301(2)
Index 303