点此搜书

iOS4SDK入门  给JavaScript程序员  影印版
  • 作 者:(美)古德曼著
  • 出 版 社:南京:东南大学出版社
  • 出版年份:2011
  • ISBN:9787564127107
  • 标注页数:297 页
  • PDF页数:315 页
  • 请阅读订购服务说明与试读!

文档类型

价格(积分)

购买连接

试读

PDF格式

10

立即购买

点击试读

订购服务说明

1、本站所有的书默认都是PDF格式,该格式图书只能阅读和打印,不能再次编辑。

2、除分上下册或者多册的情况下,一般PDF页数一定要大于标注页数才建议下单购买。【本资源315 ≥297页】

图书下载及付费说明

1、所有的电子图书为PDF格式,支持电脑、手机、平板等各类电子设备阅读;可以任意拷贝文件到不同的阅读设备里进行阅读。

2、电子图书在提交订单后一般半小时内处理完成,最晚48小时内处理完成。(非工作日购买会延迟)

3、所有的电子图书都是原书直接扫描方式制作而成。

1.Why Go Native? 1

Using an App Offline 2

More Access to the Hardware 3

More Access to the Software 4

What You Lose 6

Distribution 7

Apple iOS Developer Program 8

Content 8

Authoring Platform Choices 8

Taking the Plunge 9

2.Welcome to the iOS SDK 11

Hardware and OS Requirements 11

Installing the SDK 12

About iOS Developer Programs 12

Inside the SDK 14

Viewing Developer Documentation 15

Loading Code Samples 18

Setting the Project's Base SDK 21

Trying the iOS Simulator 22

Coming Up... 24

3.Creatinga Test Workbench 25

Creating the Project in Xcode 26

Selecting a Project Type 26

Naming and Saving the New Project 29

Welcome to Your Project 29

Editing Your First Files 31

What the runMyCode:Method Does 34

Building the User Interface 35

Adding a Button to the View 38

Connecting the Button 42

Going for a Test Ride 46

Congratulations 49

4.Structural Overview of an iOS App 51

Where It All Begins:APIs 51

APIs You Already Know 51

The Cocoa Touch APIs 52

Frameworks 53

Foundation Framework 54

UIKit Framework 54

CoreGraphics Framework 55

Adding Frameworks 55

Frameworks Set in Stone 56

Welcome to Class Files 57

The JavaScript Way 57

The Objective-C Way 58

Header File Details 61

Using Xcode to Create DGCar Class Files 65

Editing the@interface Section 68

Message Passing 70

Editing the@implementation Section 70

Integrating the DGCar Class into Workbench 75

Creating Object Instances 76

NSLog()and String Formats 77

Running the Code 78

What About Accessing Instance Variables? 79

Recap 81

5.App Execution Flow 83

Some C Language Roots in an iOS App 83

An Introduction to Delegates 85

How UIApplication Appoints Its Delegate 87

The App's Info.plist File 87

Inside MainWindow.xib 88

iPhone App Development Design Patterns 92

The Model-View-Controller Design Pattern 92

Other Design Patterns 94

The Importance of Views 95

The App Window-—UIWindow 96

Adding Another View to Workbench 97

Recap 106

6.Central Objective-C Concepts:Pointers,Data Types,and Memory Management 107

Pointers 108

Pointers and Memory 108

Pointers and Objective-C Variables 110

Pointer Notation 111

Determining Pointer Usage 113

Data Typing 115

Objective-C Data Types 116

Cocoa Touch Data Types 116

Objective-C Variable Declarations 118

Objective-C Method Declarations 118

The id Data Type 122

Converting Objective-C Data Types 123

Memory Management 125

Cleaning Up After Yourself 125

The Retain Count 127

Autorelease Pools 129

Observing Memory Usage 130

Recap 131

7.C Language Fundamentals 133

Variable Names 133

Variable Scope 136

Instance Variables 137

Local Variables 137

Local Variables in Control Structure Blocks 138

Static Local Variables 140

Global Variables 140

Constant Values 141

Functions 142

C Structures 148

C Arrays 151

Enumerated Types 152

Operators 153

Program Flow Constructions 153

Boolean Values 154

Math Object Equivalents in C 155

Inserting Comments 157

Recap 157

8.Objective-C/Cocoa Touch Fundamentals 159

More About Classes 159

Temporary Objects 160

Subclassing Framework Classes 161

Defining Your Own Custom Subclasses 162

Adding to a Class Without Subclassing—Categories 166

Real Classes in Real Action 168

TheElements Overview 168

TheElements Class File Structure 171

Class Properties 175

Specifying Properties in the Header File 176

Synthesizing Properties in the Implementation File 178

Using Properties 178

Properties in Framework Classes 180

About NSString 181

Creating an NSString 182

JavaScript String Method Equivalents in Objective-C 185

NSMutableString 189

About NSArray 190

Creating an NSArray 192

Retrieving Array Elements 193

JavaScript Array Method Equivalents in Objective-C 193

NSMutableArray 194

About NSDictionary 195

Creating an NSDictionary 195

Retrieving Dictionary Entries 197

NSMutableDictionary 198

Arrays and Dictionaries in Action 199

Recap 201

9.Common JavaScriptTasksinCocoaTouch 203

Formatting Numbers for Display 203

Preformatted Number Styles 204

Rounding Numbers for Display 206

Creating a Date Object 207

Adding a UIDatePicker to Workbench 207

Understanding NSDate 210

Creating a Date Object for a Specific Date 211

Extracting Components from an NSDate Object 213

Creating NSDate Objects from Strings 214

Converting an NSDate to a String 217

Calculating Dates 219

10 Days in the Future 219

Days Between Dares 220

Comparing Dates 221

Downloading Remote Files Asynchronously 222

Example Project 223

Creating the Request 224

Initializing the NSMutableData Object 225

Delegate Methods 226

Downloading Only When Needed 228

Accounting for Fast App Switching 231

Reading and Writing Local Files 233

iOS App Directories 233

Obtaining Directory Paths 235

Obtaining Paths to Files Delivered with Your App 236

Writing Files to Disk 236

Reading Files from Disk 238

Writing and Reading Property List Files 239

Performing File Management Tasks 240

Sorting Arrays 241

Sorting with a Selector 241

Sorting with a Function 243

Sorting Arrays of Dictionaries with NSSortDescriptor 245

Capturing User-Entered Text 246

The Code Portion 247

The Interface Builder Portion 250

Validating Text Entry with Regular Expressions 251

Modifying the Code 253

Modifying the User Interface 255

Using Regular Expressions for Text Search and Replace 255

Dragging a View Around the Screen 258

The Code Portion 259

The Interface Builder Portion 264

Recap 265

A.Getting the Most from Xcode Documentation 267

B.Common Beginner Xcode Compiler Errors 277

Glossary 281

Index 285

购买PDF格式(10分)
返回顶部