iOS Programming: The Big Nerd Ranch Guide (4th Edition)

所需积分/C币:9 2014-10-20 21:03:16 14.68MB PDF
收藏 收藏

iOS Programming: The Big Nerd Ranch Guide (4th Edition)
Acknowledgments While our names appear on the cover, many people helped make this book a reality. we would like to take this chance to thank them e The other instructors who teach the ioS Bootcamp fed us with a never-ending stream of suggestions and corrections. They are Brian Hardy, Mikey Ward, Owen Mathews, Juan Pablo Claude, Rod Strougo, Jonathan Blocksom, Fernando rodriguez, Jay Campbell, Matt Matthias Scott Ritchie, Pouria Almassi, Step Christopher, TJ USiyan, and Bolot Kerimbaev. These as instructors were often aided by their students in finding book errata, so many thanks are due to ll the students who attend the 1os bootcamp Our technical reviewers, Chris Morris, Jawwad Ahmad and veronique Brossier, helped us find and fix flaws e Our tireless editor, Susan Loper, took our distracted mumblings and made them into readable prose Elizabeth Holaday jumped in to provide copy-editing and proofing Ellie volckhausen designed the cover. ( the photo is of the bottom bracket of a bicycle frame) Chris loper at intelligent English. com designed and produced the print book and the epub and Kindle versions o The amazing team at Pearson Technology Group patiently guided us through the business end of book publishing The final and most important thanks goes to our students whose questions inspired us to write this book and whose frustrations inspired us to make it clear and comprehensible Table of contents Introduction Prerequisites What has Changed in the fourth edition? Our Teaching Philosophy How to Use This book USing an e book How This Book is Organized Style choices Typographical conventions Necessary hardware and Software 1. A Simple iOS Application Creating an Xcode Project Model-View-Controller Designing QuIz Creating a View Controller Building an Inter face Creating view obiects Configuring view objects NIB files Making connections Creating Model Obiects USing code-completion Pulling it all Together Implementing action methods Getting the view controller on the screen Running on the simulator Deploying an application Application icons Launch images 2. Obiective-C Objects Using Instances Creating objects Sending messages Destroying obiects Beginning randomltems Creating and populating an array Iterating over an array Format strings Subclassing an objective-C Class Creating an nsobject subclass Instance variables Accessing instance variables Class vs instance methods Overriding methods Initializers Class methods Testing your subclass More on NSarray and NSmutablearray Exceptions and Unrecognized Selectors Challenges Bronze Challenge: Bug Finding Silver challenge Another initializer Gold Challenge: Another Class Are You more curious? For the more curious class names For the More Curious: #import and import 3. Managing memory with arC The stack The Heap ARC and memory management Pointer variables and Object Ownership How obiects lose owners Ownership chains Strong and Weak references Properties Declaring properties Property attributes Custom accessors with properties For the More Curious: Property synthesis For the more Curious: Autorelease Pool and ARC History 4. Views and the view Hierarchy View basics The view hierarchy Subclassing uiview Views and frames Custom drawing in draw rect: Drawing a single circle UIBezier Path USing the developer documentation Drawing concentric circles More Developer documentation Bronze Challenge: Draw an Image For the more Curious: Core Graphics Gold Challenge: Shadows and gradients 5. Views: Redrawing and UIScroll view The run loop and redrawing views Class extensions USing UIScrollView Panning and paging 6. View Controllers Subclassing uiview Controller The view of a view controller Creating a view programmatically Setting the root view controller Another ul view Controller Creating a view in Interface Builder UITab Bar Controller Tab bar items UIView Controller initializers Adding a local notification Loaded and appearing views Accessing subviews Interacting with View Controllers and Their Views Bronze Challenge: Another Tab Silver Challenge: Controller Logic For the more Curious: Key-Value Coding For the More Curious: Retina Display 7. Delegation and Text Input Text fields UIResponder Configuring the keyboard Delegation Protocols Adding the labels to the screen Motion effects USing the debugger USing breakpoints Stepping through code For the more Curious: maing and UIApplication Silver challenge: Pinch to Zoom 8. UTable view and UiTable view Controller Beginning the Homepwner Application UITable view controller Subclassing uiTable view Controller UITable view's data source Creating bnritemStore Implementing data source methods JTAble view cells Creating and retrieving UITable view cells Reusing uitable view Cells Code snippet library Bronze Challenge: Sections Silver Challenge: Constant Rows Gold Challenge: Customizing the table 9. Editing UITable view Editing mode Adding rows Deleting rows Moving rows Bronze Challenge: Renaming the Delete Button Silver Challenge: Preventing Reordering Gold Challenge: Really Preventing reordering 10. UINavigation Controller UINavigation Controller An additional uiview Controller Navigating with UINavigation Controller Pushing view controllers Passing data between view controllers Appearing and disappearing views UINavigation Bar Bronze challenge: displaying a Number pad Silver challenge: dismissing a number pad Gold Challenge: Pushing more view Controllers 11. Camera Displaying Images and Ullmage view Adding a camera button Taking pictures and Ullmage Picker Controller Setting the image pi cker s source lype Setting the image picker's delegate Presenting the image picker modally Saving the image Creating brimage Store NSDictionary Creating and Using Keys Wrapping up BNRimageStore Dismissing the Keyboard Bronze Challenge: Editing an Image Silver Challenge: Removing an Image Gold Challenge: Camera Overlay For the more Curious: Navigating Implementation Files #pragma mark For the more curious recording video 12. Touch Events and UiResponder Touch events Creating the TouchTracker Application Drawing with bnrdraw View Turning Touches into Lines Handling multiple touches Bronze Challenge: Saving and Loading Silver Challenge: Colors Gold Challenge: Circles For the more curious: The Responder Chain For the more Curious: UIControl 13. UIGestureRecognizer and UIMenu Controller UIGestureRecognizer Subclasses Detecting Taps with UiTapgestureRecognizer Multiple gesture reco gnizers UIMenu Controller JILongPressGestureRecognizer UlPan Gesture Recognizer and Simultaneous Recognizers For the more Curious: UIMenu Controller and UlResponderStandardEditactions For the more curious: More on UlGestureRecognizer Silver Challenge: Mysterious Lines Gold Challenge: Speed and Size Mega-Gold Challenge: Colors 14. Debugging Tools Gauges Instruments Allocations instrument Time profiler instrument Leaks instrument Static Analyzer Proiects, Targets, and Build Settings Build configurations Changing a build setting 15. Introduction to Auto Layout Universalizing Homeowner The Auto Layout system Alignment rectangle and layout attributes Constraints Adding constraints in lnterface Builder Adding more constraints Adding even more constraints Priorities Debugging Constraints Ambiguous layout Unsatisfiable constraints Misplaced views Bronze challenge: Practice Makes Perfect Silver Challenge: Universalize quiz For the more curious Debugging Using the Auto Layout trace For the More Curious: Multiple XIB files 16. Auto Layout: Programmatic Constraints Visual Format Language Creating Constraints Adding constraints Intrinsic Content size The Other Way For the More Curious: NSAutoresizingMaskLayoutConstraint 17. Autorotation, Popover Controllers, and Modal view Controllers Autorotation Rotation notification UIPopover Controller More modal view controllers Dismissing modal view controllers Modal view controller styles Completion blocks Modal view controller transitions Thread-Safe Singletons Bronze Challenge: Another Thread-Safe Singleton Gold Challenge: Popover appearance For the more curious bitmasks For the more Curious: View Controller Relationships Parent-ck child relationships Presenting-presenter relationships Inter-family relationships 18. Saving. Loading and Application States archiving Application Sandbox Constructing a file path nSKeyedArchiver and NSKeyed Unarchiver Application States and Transitions Writing to the Filesystem with NSData NSNotification Center and Low-Memory Warnings More on nsnotification center Model-View-Controller-Store Design Pattern Bronze Challenge: PNg For the More Curious: Application State Transitions For the More Curious: Reading and Writing to the Filesystem For the More Curious: The Api plication Bundle 9. Subclassing UITableView Cell Creating bnritemCell Configuring a UITable view Cell subclass's interface Exposing the properties of BNRItemCell Using bnritemcell Constraints for BNRitemCell Image Manipulation Relaying Actions from UITable view Cells Adding a block to the cell subclass Presenting the image in a popover controller Variable Capturing Bronze challenge: Color Coding Gold Challenge: Zooming For the more curious: UICollection view 20. Dynamic Type Using Preferred Fonts Responding to User Changes Updating Auto Layout Content Hugging and Compression Resistance Priorities revisited Determining the User's Preferred Text Size Updating bnritemCell Constraint outlets Placeholder constraints 21. Web Services and UIWeb view Web services Starting the Nerdfeed application NSURL, NSURLRequest, NSURLSession, and NSUrlSessionTask Formatting URLS and requests Working with NsUrlsession son data Parsing json data The main thread JWebⅤiew Credentials Silver Challenge: More UlWeb View Gold Challenge: Upcoming Courses For the More Curious: The Request Body 22, UISplitview Controller Splitting up nerdfeed Displaying the Master View Controller in Portrait Mode Universalizing nerdfeed 23. Core Data Object-Relational Mapping Moving Homepwner to Core Data The model file NSManagedObiect and subclasses Updating bnritemStore Adding BNRAssetTypes to Homepwner More About sol Faults Trade-offs of Persistence Mechanisms

试读 127P iOS Programming: The Big Nerd Ranch Guide (4th Edition)
立即下载 身份认证VIP会员低至7折
canansaxxxx_01 同学推荐的,觉得还是有些帮助的。
Enrico_Shi 好书不要错过
关注 私信
iOS Programming: The Big Nerd Ranch Guide (4th Edition) 9积分/C币 立即下载
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第1页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第2页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第3页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第4页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第5页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第6页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第7页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第8页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第9页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第10页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第11页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第12页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第13页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第14页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第15页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第16页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第17页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第18页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第19页
iOS Programming: The Big Nerd Ranch Guide (4th Edition)第20页

试读结束, 可继续阅读

9积分/C币 立即下载