iOS.Apprentice.2.Checklists.v5.0.pdf

所需积分/C币:9 2016-12-21 09:10:28 13.82MB PDF
收藏 收藏 2
举报

Up to date for iOS 10, Xcode 8, and Swift 3 The iOS Apprentice is a series of epic-length tutorials for beginners where you’ll learn how to build 4 complete apps from scratch. 一共四个部分: 第一部分地址:http://download.csdn.net/detail/xinconan1992/9717164 随书代码地址:http://download.csdn.net/detail/xinconan1992/971
iOS Apprentice About the author Matthijs holleman is a mystic who lives at the top of a mountain where he spends all of his days and nights coding up awesome apps. actually he lives below sea level in the netherlands and is pretty down-to-earth but he does spend too much time in Xcode Checkouthiswebsiteatwww.matthijshollemans.com About the cover Striped dolphins live to about 55-60 years of age, can travel in pods numbering in the thousands and can dive to depths of 700 m to feed on fish cephalopods and crustaceans. Baby dolphins don t sleep for a full a month after they're born that puts two or three sleepless nights spent debugging code into perspective, doesn 't it?:] raywenderlich. com 3 iOS Apprentice Table of contents: Extended Tutorial 2: Checklists Your own to-dopp……6 Playing with table views.……… 10 Model-View-Controller 35 Adding new items to the checklist 59 The Add Item screen 0。D自0。自自0自0自自自00非000非D音日非。B004自自0自自自非D自0自自0000自自0自自自0D非0自。B非看曲。非 0 Editing existing checklist items 着。D。非带 109 Saving and loading the checklist items 0沿。。0。0。0自自4自●。B由0B。自自自自自自0曲自自自自自0自。04曲D0 126 Multiple checklists 146 Putting to-do items into the checklists................170 Using User Defaults to remember stuff 190 mproving the user experience…… 202 Extra feature. local notifications 233 That's a wrap! 260 raywenderlich. com 5 Tutorial 2: Checklists By Mafthiis Hollem Your own to-do app TO-do list apps are one of the most popular types of app on the app store second only to fart apps. the iphone even comes with the reminders app(but fortunately o built-in fart app) Building a to-do list app is somewhat of a rite of passage for budding ios developers, so it makes sense that you create one as well Your own to-do list app, checklists, will look like this when you're finished arrier爷 302PN Checklists < Checklists To Do anc Add item 帝 ① √Rr Soccer practice Due date Aug3,2015,3:02PM ① √ Eat ice cream QWERTY IO P ASDFGHJK ◆ Z X CVBNM The finished Checklists app The app lets you organize to-do items into lists and then check off these items once raywenderlich. com iOS Apprentice Tutorial 2: Checklists you're done with them. You can also set a reminder on a to-do item that will make the iPhone pop up an alert on the due date, even when the app isnt running As far as to-do list apps go checklists is very basic, but dont let that fool you Even a simple app such as this already has five different screens and a lot of complexity behind the scenes Table views and navigation controllers This tutorial will introduce you to two of the most commonly used UI (user interface) elements in ios apps: the table view and the navigation controller. a table view shows a list of things. The three screens above all use a table view In fact all of this app's screens are made with table views. This component is extremely versatile and the most important one to master in ios development. The navigation controller allows you to build a hierarchy of screens that lead from one to another It adds a navigation bar at the top with a title and a back button In this app tapping the name of a list -"Groceries" for example slides in the screen containing the to-do items from that list. The button in the upper-left corner takes you back to the previous screen with a smooth animation. Moving between those screens is the job of the navigation controller Navigation controllers and table views are often used together Back Navigation button Controller Neck iiis Grocer ies Bananas Potato chias Table view The grey bar at the top is the navigation bar. The list of items is the table view. Take a look at the apps that come with your iPhone- Calendar, Messages, Notes, Contacts, Mail, settings and you'll notice that even though they look slightly different all these apps work in pretty much the same way That's because they all use table views and navigation controllers raywenderlich. com lOS Apprentice Tutorial 2: Checklists 860% 千853% .aee T-Motile Nl 13: 41 Unread Settings Genera low Event 八d <Papists This Is Love macsb] Digest Numbcr 33 Mocirtoch Software BuEincEE Group 6 a Youth Group/Shadowland Software Upda e Daily Trat yCheap-websi: e- Traffic Wall Disney Spotlight Searc e sabinode @mtnboces kt Enhance yo ur power andoni Starts Thought I Knew p /papal Jz. com. b/stronger, hIml To aiRplay Guite AIrigh Accessit As The Cold Ran ralls QWER|TYU1oP Background Ap] Refresh GH KL Well I Worder ZXCVBN M as For All We Know Restrictio 日 These are all table views inside navigation controllers (The Music app also has a tab bar at the bottom, something you'll learn about in the next tutorial) If you want to learn how to program ios apps, you need to master these two components as they make an appearance in almost every app. that's exactly what you'll focus on in this tutorial. You'l also learn how to pass data from one screen to another, a very important topic that often puzzles beginners When you're done with this lesson the concepts view controller table view, and delegate will be so familiar to you that you can program them in your sleep (although i hope you'll dream of other things) This is a very long read with a lot of source code so take your time to let it all sink in. i encourage you to experiment with the code that you'll be writing. Change stuff and see what it does, even if it breaks the app Making mistakes that result in bugs, tearing your hair out in frustration the light bulb moment when you realize what's wrong the satisfaction of fixing the bug theyre all essential parts of the learning process There's no doubt: playing with the code is the quickest way to learn by the way, if something is unclear to you for example you may wonder why method names in Swift look so funny -then dont panic! Have some faith and keep going. everything will be explained in due time The Checklists app design Just so you know what you're in for, here is an overview of how the checklists app Will work raywenderlich. com lOS Apprentice Tutorial 2: Checklists c smo or o buttom ap on icon When due datc arrives 0n40 OWE RTYUIOP ASD FGHJKI .ZXCvBMa 1)All checklists 2)Add or edit checklist 3)Pick icon Ooh baath 70n+ ① button on date DDC1.20.322= Notification po Today 3 0 PM NERILIUP AS DFGHJKL 4)Checklist items 5)Add or edit item 6)Pick reminder date All the screens of the Checklists app The main screen of the app shows all your checklists"(1). You can create multiple lists to organize your to-do items A checklist has a name an icon and zero or more to -do items you can edit the name and icon of a checklist in the Add/ Edit Checklist screen(2) and (3) You tap on the checklist's name to view its to-do items (4) a to-do item has a description, a checkmark to mark the item as done, and an optional due date. You can edit the item in the add/ edit Item screen(5) os will automatically notify the user of checklist items that have their remind me option set(6), even if the app isnt running(7). that's a pretty advanced feature but i think you'l be up for the task You can find the full source code of this app in this tutorial's Resources folder, so have a play with it to get a feel for how it works Done playing? Then lets get started! Important: The iOS Apprentice tutorials are for Xcode 8.0 and better only. If you're still using Xcode 7 please update to the latest version of Xcode from the Mac App store But don't get carried away either -often Apple makes beta versions available raywenderlich. com lOS Apprentice Tutorial 2: Checklists of upcoming Xcode releases. please do not use an Xcode beta to follow this tutorial. Often the beta versions break things in unexpected ways and you'll only end up confused. stick to the official versions for now Playing with table views Seeing as table views are so important, you will start out by examining how they work. Making lists has never been this much fun! Because smart developers split up the workload into small, simple steps this is what you re going to do in this first section: 1. Put a table view on the app's screen 2. Put data into that table view 3. Allow the user to tap a row in the table to toggle a checkmark on and off Once you have these basics up and running you'll keep adding new functionality over the course of this tutorial until you end up with the full-blown app Launch Xcode and start a new project. Choose the single View Application template Choose a template for your new project. watchS tvos mecos Cross-platform Application Master-Detail age-Based Applicaton AppIcation Sticker pack plication 画 Cocoa ouch ocoa Touch Metal -ibrary Framewor Static Library Cancel Provine Choosing the Xcode template Xcode will ask you to fill out a few options raywenderlich. com 10 lOS Apprentice Tutorial 2: Checklists Choose options for your new project Product Name: Checklists Team:Add Organization Identifier: com. razeware Bundle identifier: com. razeware Checklists Devices: iPhone □ Use core data □ Include UI Tests Choosing the template options Fill out these options as follows: e Product name Checklists Team: Just leave this to the default setting Organization Name: Your name or the name of your company Organization Identifier Use your own identifier here using reverse domain name notation Language: Swift ● Devices: iPhone Use Core data, include unit tests include ui tests these should be off Press Next and choose a location for the project You can run the app if you want but at this point it just consists of a white screen Checklists will run in portrait orientation only but the project that Xcode just generated also includes the landscape orientation )Click on the Check lists project item at the top of the project navigator and go to the general tab. Under deployment Info, Device Orientation, make sure that only portrait is selected raywenderlich. com

...展开详情
试读 127P iOS.Apprentice.2.Checklists.v5.0.pdf
立即下载 低至0.43元/次 身份认证VIP会员低至7折
    一个资源只可评论一次,评论内容不能少于5个字
    lheiying 很棒的资源,感谢分享!
    2020-04-22
    回复
    li_yadan 第五版的资料,很不错 不过现在也有更新了
    2018-06-10
    回复
    jiapengfei99 第五版的资料,很不错
    2017-10-12
    回复
    img
    xinconan2

    关注 私信 TA的资源

    上传资源赚积分,得勋章
    最新推荐
    iOS.Apprentice.2.Checklists.v5.0.pdf 9积分/C币 立即下载
    1/127
    iOS.Apprentice.2.Checklists.v5.0.pdf第1页
    iOS.Apprentice.2.Checklists.v5.0.pdf第2页
    iOS.Apprentice.2.Checklists.v5.0.pdf第3页
    iOS.Apprentice.2.Checklists.v5.0.pdf第4页
    iOS.Apprentice.2.Checklists.v5.0.pdf第5页
    iOS.Apprentice.2.Checklists.v5.0.pdf第6页
    iOS.Apprentice.2.Checklists.v5.0.pdf第7页
    iOS.Apprentice.2.Checklists.v5.0.pdf第8页
    iOS.Apprentice.2.Checklists.v5.0.pdf第9页
    iOS.Apprentice.2.Checklists.v5.0.pdf第10页
    iOS.Apprentice.2.Checklists.v5.0.pdf第11页
    iOS.Apprentice.2.Checklists.v5.0.pdf第12页
    iOS.Apprentice.2.Checklists.v5.0.pdf第13页
    iOS.Apprentice.2.Checklists.v5.0.pdf第14页
    iOS.Apprentice.2.Checklists.v5.0.pdf第15页
    iOS.Apprentice.2.Checklists.v5.0.pdf第16页
    iOS.Apprentice.2.Checklists.v5.0.pdf第17页
    iOS.Apprentice.2.Checklists.v5.0.pdf第18页
    iOS.Apprentice.2.Checklists.v5.0.pdf第19页
    iOS.Apprentice.2.Checklists.v5.0.pdf第20页

    试读已结束,剩余107页未读...

    9积分/C币 立即下载 >