From ae5d3716f0a84100aaaa58cb61f8f41d68087899 Mon Sep 17 00:00:00 2001 From: clarknt <24315769+clarknt@users.noreply.github.com> Date: Wed, 7 Aug 2019 11:14:15 -0400 Subject: [PATCH] README --- 01-Project1/README.md | 1 + 02-Project2/README.md | 1 + 03-Project3/README.md | 1 + 04-Project3-Challenge2/README.md | 1 + 05-Project3-Challenge3/README.md | 1 + 06-Milestone-Projects1-3/README.md | 1 + 07-Project4/README.md | 1 + 08-Project5/README.md | 1 + 10-Project6b/README.md | 1 + 11-Milestone-Projects4-6/README.md | 1 + 12-Project7/README.md | 1 + 13-Project8/README.md | 1 + 15-Project9-Challenge1/README.md | 1 + 16-Project9-Challenge2/README.md | 1 + 17-Project9-Challenge3/README.md | 1 + 18-Milestone-Projects7-9/README.md | 1 + 19-Project10/README.md | 1 + 20-Project10-Challenge3/README.md | 1 + 21-Project11/README.md | 1 + 25-Project12-Challenge1/README.md | 1 + 26-Project12-Challenge2/README.md | 1 + 27-Project12-Challenge3/README.md | 1 + 28-Milestone-Projects10-12/README.md | 1 + 29-Project13/README.md | 1 + 30-Project14/README.md | 1 + 32-Project15-Challenge1/README.md | 1 + 33-Project15-Challenge2/README.md | 1 + 34-Project15-Challenge3/README.md | 1 + 35-Milestone-Projects13-15/README.md | 1 + 36-Project16/README.md | 9 +++++---- 37-Project17/README.md | 1 + 38-Project18/README.md | 1 + 39-Project18-Challenges1-2/README.md | 1 + 40-Milestone-Projects16-18/README.md | 1 + 41-Project19/README.md | 1 + 42-Project20/README.md | 1 + 43-Project21/README.md | 1 + 44-Project21-Challenge3/README.md | 1 + 45-Milestone-Projects19-21/README.md | 1 + 46-Project22/README.md | 1 + 47-Project23/README.md | 1 + 48-Project24/README.md | 3 ++- 49-Milestone-Projects22-24/README.md | 1 + 50-Project25/README.md | 1 + 51-Project26/README.md | 1 + 52-Project27/README.md | 1 + 53-Project27-Challenge3/README.md | 1 + 54-Milestone-Projects25-27/README.md | 1 + 55-CoreGraphics-Redux/README.md | 2 ++ 56-Project28/README.md | 1 + 57-Project28-Challenge3/README.md | 1 + 58-Project29/README.md | 1 + 59-Project30/README.md | 1 + 60-Project30-Challenge2/README.md | 1 + .../project.pbxproj | 4 ++++ 61-Milestone-Projects28-30/README.md | 1 + 61-Milestone-Projects28-30/Test.swift | 15 +++++++++++++++ 57 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 61-Milestone-Projects28-30/Test.swift diff --git a/01-Project1/README.md b/01-Project1/README.md index 8e9adde..364a9dc 100644 --- a/01-Project1/README.md +++ b/01-Project1/README.md @@ -10,6 +10,7 @@ View controllers, Storyboard, FileManager ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/1/7/wrap-up): >1. Use Interface Builder to select the text label inside your table view cell and adjust its font size to something larger – experiment and see what looks good. >2. In your main table view, show the image names in sorted order, so “nssl0033.jpg” comes before “nssl0034.jpg”. >3. Rather than show image names in the detail title bar, show “Picture X of Y”, where Y is the total number of images and X is the selected picture’s position in the array. Make sure you count from 1 rather than 0. diff --git a/02-Project2/README.md b/02-Project2/README.md index cc2b3b2..64642a4 100644 --- a/02-Project2/README.md +++ b/02-Project2/README.md @@ -10,6 +10,7 @@ UIButton, CALayer, IBAction ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/2/6/wrap-up): >1. Try showing the player’s score in the navigation bar, alongside the flag to guess. >2. Keep track of how many questions have been asked, and show one final alert controller after they have answered 10. This should show their final score. >3. When someone chooses the wrong flag, tell them their mistake in your alert message – something like “Wrong! That’s the flag of France,” for example. diff --git a/03-Project3/README.md b/03-Project3/README.md index a583026..4748d8f 100644 --- a/03-Project3/README.md +++ b/03-Project3/README.md @@ -10,6 +10,7 @@ UIBarButtonItem, UIActivityController ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/3/3/wrap-up): >1. Try adding the image name to the list of items that are shared. The activityItems parameter is an array, so you can add strings and other things freely. Note: Facebook won’t let you share text, but most other share options will. >2. [Challenge 2](../04-Project3-Challenge2) >3. [Challenge 3](../05-Project3-Challenge3) diff --git a/04-Project3-Challenge2/README.md b/04-Project3-Challenge2/README.md index 5ce97d8..8a093ae 100644 --- a/04-Project3-Challenge2/README.md +++ b/04-Project3-Challenge2/README.md @@ -4,6 +4,7 @@ https://www.hackingwithswift.com/read/3/3/wrap-up ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/3/3/wrap-up): >Go back to project 1 and add a bar button item to the main view controller that recommends the app to other people. ## Screenshots diff --git a/05-Project3-Challenge3/README.md b/05-Project3-Challenge3/README.md index 2977d42..156f72e 100644 --- a/05-Project3-Challenge3/README.md +++ b/05-Project3-Challenge3/README.md @@ -4,6 +4,7 @@ https://www.hackingwithswift.com/read/3/3/wrap-up ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/3/3/wrap-up): >Go back to project 2 and add a bar button item that shows their score when tapped. ## Screenshots diff --git a/06-Milestone-Projects1-3/README.md b/06-Milestone-Projects1-3/README.md index 6deea49..b5e1571 100644 --- a/06-Milestone-Projects1-3/README.md +++ b/06-Milestone-Projects1-3/README.md @@ -13,6 +13,7 @@ Notes: ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/guide/2/3/challenge): >You have a rudimentary understanding of table views, image views, and navigation controllers, so let’s put them together: your challenge is to create an app that lists various world flags in a table view. When one of them is tapped, slide in a detail view controller that contains an image view, showing the same flag full size. On the detail view controller, add an action button that lets the user share the flag picture and country name using UIActivityViewController. > >To solve this challenge you’ll need to draw on skills you learned in tutorials 1, 2, and 3: diff --git a/07-Project4/README.md b/07-Project4/README.md index 42bb241..e5b5b4a 100644 --- a/07-Project4/README.md +++ b/07-Project4/README.md @@ -10,6 +10,7 @@ WKWebView, Action sheets, UIToolbar, UIProgressView ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/4/6/wrap-up): >1. If users try to visit a URL that isn’t allowed, show an alert saying it’s blocked. >2. Try making two new toolbar items with the titles Back and Forward. You should make them use webView.goBack and webView.goForward. >3. For more of a challenge, try changing the initial view controller to a table view like in project 1, where users can choose their website from a list rather than just having the first in the array loaded up front. diff --git a/08-Project5/README.md b/08-Project5/README.md index 86beb22..3020486 100644 --- a/08-Project5/README.md +++ b/08-Project5/README.md @@ -10,6 +10,7 @@ Reading from disk, UIAlertController, IndexPath ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/5/7/wrap-up): >1. Disallow answers that are shorter than three letters or are just our start word. For the three-letter check, the easiest thing to do is put a check into isReal() that returns false if the word length is under three letters. For the second part, just compare the start word against their input word and return false if they are the same. >2. Refactor all the else statements we just added so that they call a new method called showErrorMessage(). This should accept an error message and a title, and do all the UIAlertController work from there. >3. Add a left bar button item that calls startGame(), so users can restart with a new word whenever they want to. diff --git a/10-Project6b/README.md b/10-Project6b/README.md index 913e640..630e1ef 100644 --- a/10-Project6b/README.md +++ b/10-Project6b/README.md @@ -10,6 +10,7 @@ Auto Layout, Constraints, Visual Format Language ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/6/6/wrap-up): >1. Try replacing the widthAnchor of our labels with leadingAnchor and trailingAnchor constraints, which more explicitly pin the label to the edges of its parent. >2. Once you’ve completed the first challenge, try using the safeAreaLayoutGuide for those constraints. You can see if this is working by rotating to landscape, because the labels won’t go under the safe area. >3. Try making the height of your labels equal to 1/5th of the main view, minus 10 for the spacing. This is a hard one, but I’ve included hints below! diff --git a/11-Milestone-Projects4-6/README.md b/11-Milestone-Projects4-6/README.md index f82f3dd..c1ab3b6 100644 --- a/11-Milestone-Projects4-6/README.md +++ b/11-Milestone-Projects4-6/README.md @@ -8,6 +8,7 @@ Bonus: ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/guide/3/3/challenge): >It’s time to put your skills to the test by making your own complete app from scratch. This time your job is to create an app that lets people create a shopping list by adding items to a table view. > >The best way to tackle this app is to think about how you build project 5: it was a table view that showed items from an array, and we used a UIAlertController with a text field to let users enter free text that got appended to the array. That forms the foundation of this app, except this time you don’t need to validate items that get added – if users enter some text, assume it’s a real product and add it to their list. diff --git a/12-Project7/README.md b/12-Project7/README.md index 33ff699..8e6c6a0 100644 --- a/12-Project7/README.md +++ b/12-Project7/README.md @@ -15,6 +15,7 @@ UITabBarController, JSON, Data, Codable ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/7/6/wrap-up): >1. Add a Credits button to the top-right corner using UIBarButtonItem. When this is tapped, show an alert telling users the data comes from the We The People API of the Whitehouse. >2. Let users filter the petitions they see. This involves creating a second array of filtered items that contains only petitions matching a string the user entered. Use a UIAlertController with a text field to let them enter that string. This is a tough one, so I’ve included some hints below if you get stuck. >3. Experiment with the HTML – this isn’t a HTML or CSS tutorial, but you can find lots of resources online to give you enough knowledge to tinker with the layout a little. diff --git a/13-Project8/README.md b/13-Project8/README.md index cb9c9d5..2f30730 100644 --- a/13-Project8/README.md +++ b/13-Project8/README.md @@ -13,6 +13,7 @@ UI in code, Text alignment, Layout Margins, UIFont ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/8/6/wrap-up): >1. Use the techniques you learned in project 2 to draw a thin gray line around the buttons view, to make it stand out from the rest of the UI. >2. If the user enters an incorrect guess, show an alert telling them they are wrong. You’ll need to extend the submitTapped() method so that if firstIndex(of:) failed to find the guess you show the alert. >3. Try making the game also deduct points if the player makes an incorrect guess. Think about how you can move to the next level – we can’t use a simple division remainder on the player’s score any more, because they might have lost some points. diff --git a/15-Project9-Challenge1/README.md b/15-Project9-Challenge1/README.md index 8a0e232..c5a88a1 100644 --- a/15-Project9-Challenge1/README.md +++ b/15-Project9-Challenge1/README.md @@ -4,6 +4,7 @@ https://www.hackingwithswift.com/read/9/6/wrap-up ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/9/6/wrap-up): >Modify project 1 so that loading the list of NSSL images from our bundle happens in the background. Make sure you call reloadData() on the table view once loading has finished! ## Screenshots diff --git a/16-Project9-Challenge2/README.md b/16-Project9-Challenge2/README.md index 20d1974..fa64a99 100644 --- a/16-Project9-Challenge2/README.md +++ b/16-Project9-Challenge2/README.md @@ -4,6 +4,7 @@ https://www.hackingwithswift.com/read/9/6/wrap-up ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/9/6/wrap-up): >Modify project 8 so that loading and parsing a level takes place in the background. Once you’re done, make sure you update the UI on the main thread! ## Screenshots diff --git a/17-Project9-Challenge3/README.md b/17-Project9-Challenge3/README.md index c497ef8..60ea21a 100644 --- a/17-Project9-Challenge3/README.md +++ b/17-Project9-Challenge3/README.md @@ -4,6 +4,7 @@ https://www.hackingwithswift.com/read/7/6/wrap-up ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/9/6/wrap-up): >Modify project 7 so that your filtering code takes place in the background. This filtering code was added in one of the challenges for the project, so hopefully you didn’t skip it! ## Screenshots diff --git a/18-Milestone-Projects7-9/README.md b/18-Milestone-Projects7-9/README.md index 64001a9..75dddc6 100644 --- a/18-Milestone-Projects7-9/README.md +++ b/18-Milestone-Projects7-9/README.md @@ -10,6 +10,7 @@ Bonus: ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/guide/4/3/challenge): >This is the first challenge that involves you creating a game. You’ll still be using UIKit, though, so it’s a good chance to practice your app skills too. > >The challenge is this: make a hangman game using UIKit. As a reminder, this means choosing a random word from a list of possibilities, but presenting it to the user as a series of underscores. So, if your word was “RHYTHM” the user would see “??????”. diff --git a/19-Project10/README.md b/19-Project10/README.md index d7b2c00..e568742 100644 --- a/19-Project10/README.md +++ b/19-Project10/README.md @@ -12,6 +12,7 @@ UICollectionView, UIImagePickerController, NSObject ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/10/7/wrap-up): >1. Add a second UIAlertController that gets shown when the user taps a picture, asking them whether they want to rename the person or delete them. >2. Try using picker.sourceType = .camera when creating your image picker, which will tell it to create a new image by taking a photo. This is only available on devices (not on the simulator) so you might want to check the return value of UIImagePickerController.isSourceTypeAvailable() before trying to use it! >3. [Challenge 3](../20-Project10-Challenge3) diff --git a/20-Project10-Challenge3/README.md b/20-Project10-Challenge3/README.md index 99fb1eb..1e3bd22 100644 --- a/20-Project10-Challenge3/README.md +++ b/20-Project10-Challenge3/README.md @@ -4,6 +4,7 @@ https://www.hackingwithswift.com/read/10/7/wrap-up ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/10/7/wrap-up): >Modify project 1 so that it uses a collection view controller rather than a table view controller. I recommend you keep a copy of your original table view controller code so you can refer back to it later on. ## Screenshots diff --git a/21-Project11/README.md b/21-Project11/README.md index 01eabd4..e752292 100644 --- a/21-Project11/README.md +++ b/21-Project11/README.md @@ -14,6 +14,7 @@ SpriteKit, Nodes, UITouch, Physics Body, SKAction, Collisions, Emitters ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/11/8/wrap-up): >1. The pictures we’re using in have other ball pictures rather than just “ballRed”. Try writing code to use a random ball color each time they tap the screen. >2. Right now, users can tap anywhere to have a ball created there, which makes the game too easy. Try to force the Y value of new balls so they are near the top of the screen. >3. Give players a limit of five balls, then remove obstacle boxes when they are hit. Can they clear all the pins with just five balls? You could make it so that landing on a green slot gets them an extra ball. diff --git a/25-Project12-Challenge1/README.md b/25-Project12-Challenge1/README.md index cb6a6e2..1422bcf 100644 --- a/25-Project12-Challenge1/README.md +++ b/25-Project12-Challenge1/README.md @@ -4,6 +4,7 @@ https://www.hackingwithswift.com/read/12/5/wrap-up ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/12/5/wrap-up): >Modify project 1 so that it remembers how many times each storm image was shown – you don’t need to show it anywhere, but you’re welcome to try modifying your original copy of project 1 to show the view count as a subtitle below each image name in the table view. ## Screenshots diff --git a/26-Project12-Challenge2/README.md b/26-Project12-Challenge2/README.md index ee90a82..6853756 100644 --- a/26-Project12-Challenge2/README.md +++ b/26-Project12-Challenge2/README.md @@ -4,6 +4,7 @@ https://www.hackingwithswift.com/read/12/5/wrap-up ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/12/5/wrap-up): >Modify project 2 so that it saves the player’s highest score, and shows a special message if their new score beat the previous high score. ## Screenshots diff --git a/27-Project12-Challenge3/README.md b/27-Project12-Challenge3/README.md index 1bc9128..4906507 100644 --- a/27-Project12-Challenge3/README.md +++ b/27-Project12-Challenge3/README.md @@ -4,6 +4,7 @@ https://www.hackingwithswift.com/read/12/5/wrap-up ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/12/5/wrap-up): >Modify project 5 so that it saves the current word and all the player’s entries to UserDefaults, then loads them back when the app launches. ## Screenshots diff --git a/28-Milestone-Projects10-12/README.md b/28-Milestone-Projects10-12/README.md index 0359711..59ca322 100644 --- a/28-Milestone-Projects10-12/README.md +++ b/28-Milestone-Projects10-12/README.md @@ -7,6 +7,7 @@ Bonus: ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/guide/5/3/challenge): >Your challenge is to put two different projects into one: I’d like you to let users take photos of things that interest them, add captions to them, then show those photos in a table view. Tapping the caption should show the picture in a new view controller, like we did with project 1. So, your finished project needs to use elements from both project 1 and project 12, which should give you ample chance to practice. > >This will require you to use the picker.sourceType = .camera setting for your image picker controller, create a custom type that stores a filename and a caption, then show the list of saved pictures in a table view. Remember: using the camera is only possible on a physical device. diff --git a/29-Project13/README.md b/29-Project13/README.md index bd0a3e6..5c28e82 100644 --- a/29-Project13/README.md +++ b/29-Project13/README.md @@ -10,6 +10,7 @@ UISlider, UIImagePickerController, CIContext, CIFilter, Saving photos ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/13/6/wrap-up): >1. Try making the Save button show an error if there was no image in the image view. >2. Make the Change Filter button change its title to show the name of the currently selected filter. >3. Experiment with having more than one slider, to control each of the input keys you care about. For example, you might have one for radius and one for intensity. diff --git a/30-Project14/README.md b/30-Project14/README.md index ccb86b6..d8337f5 100644 --- a/30-Project14/README.md +++ b/30-Project14/README.md @@ -15,6 +15,7 @@ SKCropNode, SKTexture, SKAction ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/14/5/wrap-up): >1. Record your own voice saying "Game over!" and have it play when the game ends. >2. When showing “Game Over” add an SKLabelNode showing their final score. >3. Use SKEmitterNode to create a smoke-like effect when penguins are hit, and a separate mud-like effect when they go into or come out of a hole. diff --git a/32-Project15-Challenge1/README.md b/32-Project15-Challenge1/README.md index 6930171..fb61629 100644 --- a/32-Project15-Challenge1/README.md +++ b/32-Project15-Challenge1/README.md @@ -4,6 +4,7 @@ https://www.hackingwithswift.com/read/15/5/wrap-up ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/15/5/wrap-up): >Go back to project 8 and make the letter group buttons fade out when they are tapped. We were using the isHidden property, but you'll need to switch to alpha because isHidden is either true or false, it has no animatable values between. ## Screenshots diff --git a/33-Project15-Challenge2/README.md b/33-Project15-Challenge2/README.md index eea981c..09277ee 100644 --- a/33-Project15-Challenge2/README.md +++ b/33-Project15-Challenge2/README.md @@ -4,6 +4,7 @@ https://www.hackingwithswift.com/read/15/5/wrap-up ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/15/5/wrap-up): >Go back to project 13 and make the image view fade in when a new picture is chosen. To make this work, set the alpha to 0 first. ## Screenshots diff --git a/34-Project15-Challenge3/README.md b/34-Project15-Challenge3/README.md index 02c525c..4652e72 100644 --- a/34-Project15-Challenge3/README.md +++ b/34-Project15-Challenge3/README.md @@ -4,6 +4,7 @@ https://www.hackingwithswift.com/read/15/5/wrap-up ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/15/5/wrap-up): >Go back to project 2 and make the flags scale down with a little bounce when pressed. ## Screenshots diff --git a/35-Milestone-Projects13-15/README.md b/35-Milestone-Projects13-15/README.md index 39f5292..52977bb 100644 --- a/35-Milestone-Projects13-15/README.md +++ b/35-Milestone-Projects13-15/README.md @@ -8,6 +8,7 @@ Countries API thanks to [REST Countries](https://restcountries.eu/) ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/guide/6/3/challenge): >Your challenge is to make an app that contains facts about countries: show a list of country names in a table view, then when one is tapped bring in a new screen that contains its capital city, size, population, currency, and any other facts that interest you. The type of facts you include is down to you – Wikipedia has a huge selection to choose from. > >To make this app, I would recommend you blend parts of project 1 project 7. That means showing the country names in a table view, then showing the detailed information in a second table view. diff --git a/36-Project16/README.md b/36-Project16/README.md index e760808..746e69b 100644 --- a/36-Project16/README.md +++ b/36-Project16/README.md @@ -2,7 +2,7 @@ https://www.hackingwithswift.com/100/60 -Includes solutions to the [challenges](https://www.hackingwithswift.com/guide/6/3/challenge). +Includes solutions to the [challenges](https://www.hackingwithswift.com/read/16/4/wrap-up). ## Topics @@ -10,9 +10,10 @@ MapKit, MKMapView, MKAnnotation, CLLocationCoordinate2D ## Challenges ->1. You should create a custom Country struct that has properties for each of the facts you have in your JSON file. You can then have a [Country] array in your view controller. ->2. When using a table view in your detail view controller, try setting the numberOfLines property of the cell’s text label to be 0. That ought to allow the cell to fill up to two lines of text by default. ->3. Don’t forget all the little UI touches: adding a disclosure indicator to the countries table, adding titles to the navigation controller, and so on. You could even add an action button to the detail view that shares a fact about the selected country. +From [Hacking with Swift](https://www.hackingwithswift.com/read/16/4/wrap-up): +>1. Try typecasting the return value from dequeueReusableAnnotationView() so that it's an MKPinAnnotationView. Once that’s done, change the pinTintColor property to your favorite UIColor. +>2. Add a UIAlertController that lets users specify how they want to view the map. There's a mapType property that draws the maps in different ways. For example, .satellite gives a satellite view of the terrain. +>3. Modify the callout button so that pressing it shows a new view controller with a web view, taking users to the Wikipedia entry for that city. ## Screenshots diff --git a/37-Project17/README.md b/37-Project17/README.md index 3ff308c..88c97a7 100644 --- a/37-Project17/README.md +++ b/37-Project17/README.md @@ -13,6 +13,7 @@ Collisions, Timer, Linear / Angular damping ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/17/5/wrap-up): >1. Stop the player from cheating by lifting their finger and tapping elsewhere – try implementing touchesEnded() to make it work. >2. Make the timer start at one second, but then after 20 enemies have been made subtract 0.1 seconds from it so it’s triggered every 0.9 seconds. After making 20 more, subtract another 0.1, and so on. Note: you should call invalidate() on gameTimer before giving it a new value, otherwise you end up with multiple timers. >3. Stop creating space debris after the player has died. diff --git a/38-Project18/README.md b/38-Project18/README.md index f260811..77796e9 100644 --- a/38-Project18/README.md +++ b/38-Project18/README.md @@ -10,6 +10,7 @@ Debugging ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/18/6/wrap-up): >1. [Challenge 1](../39-Project18-Challenges1-2) >2. [Challenge 2](../39-Project18-Challenges1-2) >3. Go back to project 5, and try adding a conditional breakpoint to the start of the submit() method that pauses only if the user submits a word with six or more letters. diff --git a/39-Project18-Challenges1-2/README.md b/39-Project18-Challenges1-2/README.md index 6a961b6..c2a6262 100644 --- a/39-Project18-Challenges1-2/README.md +++ b/39-Project18-Challenges1-2/README.md @@ -6,6 +6,7 @@ For the sake of completion as additions to Project 1 are limited. ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/18/6/wrap-up): >1. Temporarily try adding an exception breakpoint to project 1, then changing the call to instantiateViewController() so that it uses the storyboard identifier “Bad” – this will fail, but your exception breakpoint should catch it. >2. In project 1, add a call to assert() in the viewDidLoad() method of DetailViewController.swift, checking that selectedImage always has a value. diff --git a/40-Milestone-Projects16-18/README.md b/40-Milestone-Projects16-18/README.md index 96d14ce..50c046a 100644 --- a/40-Milestone-Projects16-18/README.md +++ b/40-Milestone-Projects16-18/README.md @@ -8,6 +8,7 @@ Game sounds under [CC Attribution license](https://creativecommons.org/licenses/ ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/guide/7/3/challenge): >It’s time to put your skills to the test and make your own app, starting from a blank canvas. This time your challenge is to make a shooting gallery game using SpriteKit: create three rows on the screen, then have targets slide across from one side to the other. If the user taps a target, make it fade out and award them points. > >How you implement this game really depends on what kind of shooting gallery games you’ve played in the past, but here are some suggestions to get you started: diff --git a/41-Project19/README.md b/41-Project19/README.md index 4f5e992..a749f71 100644 --- a/41-Project19/README.md +++ b/41-Project19/README.md @@ -9,6 +9,7 @@ Bonus: ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/19/8/wrap-up): >1. Add a bar button item that lets users select from a handful of prewritten example scripts, shown using a UIAlertController – at the very least your list should include the example we used in this project. >2. You're already receiving the URL of the site the user is on, so use UserDefaults to save the user's JavaScript for each site. You should convert the URL to a URL object in order to use its host property. >3. For something bigger, let users name their scripts, then select one to load using a UITableView. diff --git a/42-Project20/README.md b/42-Project20/README.md index b67acb3..850fe06 100644 --- a/42-Project20/README.md +++ b/42-Project20/README.md @@ -10,6 +10,7 @@ Bonus: ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/20/5/wrap-up): >1. For an easy challenge try adding a score label that updates as the player’s score changes. >2. Make the game end after a certain number of launches. You will need to use the invalidate() method of Timer to stop it from repeating. >3. Use the waitForDuration and removeFromParent actions in a sequence to make sure explosion particle emitters are removed from the game scene when they are finished. diff --git a/43-Project21/README.md b/43-Project21/README.md index 6eaf566..932f59a 100644 --- a/43-Project21/README.md +++ b/43-Project21/README.md @@ -6,6 +6,7 @@ Includes solutions to the [challenges](https://www.hackingwithswift.com/read/21/ ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/21/4/wrap-up): >1. Update the code in didReceive so that it shows different instances of UIAlertController depending on which action identifier was passed in. >2. For a harder challenge, add a second UNNotificationAction to the alarm category of project 21. Give it the title “Remind me later”, and make it call scheduleLocal() so that the same alert is shown in 24 hours. (For the purpose of these challenges, a time interval notification with 86400 seconds is good enough – that’s roughly how many seconds there are in a day, excluding summer time changes and leap seconds.) >3. [Challenge 3](../44-Project21-Challenge3) diff --git a/44-Project21-Challenge3/README.md b/44-Project21-Challenge3/README.md index 6b52031..3379ff2 100644 --- a/44-Project21-Challenge3/README.md +++ b/44-Project21-Challenge3/README.md @@ -8,6 +8,7 @@ Bonus: ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/21/4/wrap-up): >And for an even harder challenge, update project 2 so that it reminds players to come back and play every day. This means scheduling a week of notifications ahead of time, each of which launch the app. When the app is finally launched, make sure you call removeAllPendingNotificationRequests() to clear any un-shown alerts, then make new alerts for future days. ## Screenshots diff --git a/45-Milestone-Projects19-21/README.md b/45-Milestone-Projects19-21/README.md index a72c0b1..5ed449f 100644 --- a/45-Milestone-Projects19-21/README.md +++ b/45-Milestone-Projects19-21/README.md @@ -6,6 +6,7 @@ Background image under [CC Attribution license](https://creativecommons.org/lice ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/guide/8/3/challenge): >Have you ever heard the phrase, “imitation is the highest form of flattery”? I can’t think of anywhere it’s more true than on iOS: Apple sets an extremely high standard for apps, and encourages us all to follow suit by releasing a vast collection of powerful, flexible APIs to work with. > >Your challenge for this milestone is to use those API to imitate Apple as closely as you can: I’d like you to recreate the iOS Notes app. I suggest you follow the iPhone version, because it’s fairly simple: a navigation controller, a table view controller, and a detail view controller with a full-screen text view. diff --git a/46-Project22/README.md b/46-Project22/README.md index 9c95766..287dcf5 100644 --- a/46-Project22/README.md +++ b/46-Project22/README.md @@ -6,6 +6,7 @@ Includes solutions to the [challenges](https://www.hackingwithswift.com/read/22/ ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/22/4/wrap-up): >1. Write code that shows a UIAlertController when your beacon is first detected. Make sure you set a Boolean to say the alert has been shown, so it doesn’t keep appearing. >2. Go through two or three other iBeacons in the Detect Beacon app and add their UUIDs to your app, then register all of them with iOS. Now add a second label to the app that shows new text depending on which beacon was located. >3. Add a circle to your view, then use animation to scale it up and down depending on the distance from the beacon – try 0.001 for unknown, 0.25 for far, 0.5 for near, and 1.0 for immediate. You can make the circle by adding an image, or by creating a view that’s 256 wide by 256 high then setting its layer.cornerRadius to 128 so that it’s round. diff --git a/47-Project23/README.md b/47-Project23/README.md index 629d8c7..9766c45 100644 --- a/47-Project23/README.md +++ b/47-Project23/README.md @@ -9,6 +9,7 @@ Bonus: ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/23/8/wrap-up): >1. Try removing the magic numbers in the createEnemy() method. Instead, define them as constant properties of your class, giving them useful names. >2. Create a new, fast-moving type of enemy that awards the player bonus points if they hit it. >3. Add a “Game over” sprite node to the game scene when the player loses all their lives. diff --git a/48-Project24/README.md b/48-Project24/README.md index 57aa029..d84192e 100644 --- a/48-Project24/README.md +++ b/48-Project24/README.md @@ -2,12 +2,13 @@ https://www.hackingwithswift.com/100/80 -Includes solutions to the [challenges](https://www.hackingwithswift.com/read/23/8/wrap-up). +Includes solutions to the [challenges](https://www.hackingwithswift.com/read/24/5/wrap-up). This is a playground project. ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/24/5/wrap-up): >1. Create a String extension that adds a withPrefix() method. If the string already contains the prefix it should return itself; if it doesn’t contain the prefix, it should return itself with the prefix added. For example: "pet".withPrefix("car") should return “carpet”. >2. Create a String extension that adds an isNumeric property that returns true if the string holds any sort of number. Tip: creating a Double from a String is a failable initializer. >3. Create a String extension that adds a lines property that returns an array of all the lines in a string. So, “this\nis\na\ntest” should return an array with four elements. diff --git a/49-Milestone-Projects22-24/README.md b/49-Milestone-Projects22-24/README.md index ce815f9..6b3eb55 100644 --- a/49-Milestone-Projects22-24/README.md +++ b/49-Milestone-Projects22-24/README.md @@ -9,6 +9,7 @@ Bonus: ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/guide/9/3/challenge): >Your challenge this time is not to build a project from scratch. Instead, I want you to implement three Swift language extensions using what you learned in project 24. I’ve ordered them easy to hard, so you should work your way from first to last if you want to make your life easy! > >Here are the extensions I’d like you to implement: diff --git a/50-Project25/README.md b/50-Project25/README.md index 328efa5..5b0c048 100644 --- a/50-Project25/README.md +++ b/50-Project25/README.md @@ -6,6 +6,7 @@ Includes solutions to the [challenges](https://www.hackingwithswift.com/read/25/ ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/25/5/wrap-up): >1. Show an alert when a user has disconnected from our multipeer network. Something like “Paul’s iPhone has disconnected” is enough. >2. Try sending text messages across the network. You can create a Data from a string using Data(yourString.utf8), and convert a Data back to a string by using String(decoding: yourData, as: UTF8.self). >3. Add a button that shows an alert controller listing the names of all devices currently connected to the session – use the connectedPeers property of your session to find that information. diff --git a/51-Project26/README.md b/51-Project26/README.md index bd623a2..5331212 100644 --- a/51-Project26/README.md +++ b/51-Project26/README.md @@ -8,6 +8,7 @@ Portal assets under [CC0 License](https://creativecommons.org/publicdomain/zero/ ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/26/5/wrap-up): >1. Rewrite the loadLevel() method so that it's made up of multiple smaller methods. This will make your code easier to read and easier to maintain, or at least it should do if you do a good job! >2. When the player finally makes it to the finish marker, nothing happens. What should happen? Well, that's down to you now. You could easily design several new levels and have them progress through. >3. Add a new block type, such as a teleport that moves the player from one teleport point to the other. Add a new letter type in loadLevel(), add another collision type to our enum, then see what you can do. diff --git a/52-Project27/README.md b/52-Project27/README.md index 541fa86..56aad9f 100644 --- a/52-Project27/README.md +++ b/52-Project27/README.md @@ -6,6 +6,7 @@ Includes solutions to the [challenges](https://www.hackingwithswift.com/read/27/ ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/27/7/wrap-up): >1. Pick any emoji and try creating it using Core Graphics. You should find some easy enough, but for a harder challenge you could also try something like the star emoji. >2. Use a combination of move(to:) and addLine(to:) to create and stroke a path that spells “TWIN” on the canvas. >3. [Challenge 3](../53-Project27-Challenge3) diff --git a/53-Project27-Challenge3/README.md b/53-Project27-Challenge3/README.md index 0f66868..80cc874 100644 --- a/53-Project27-Challenge3/README.md +++ b/53-Project27-Challenge3/README.md @@ -4,6 +4,7 @@ https://www.hackingwithswift.com/read/27/7/wrap-up ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/27/7/wrap-up): >Go back to project 3 and change the way the selected image is shared so that it has some rendered text on top saying “From Storm Viewer”. This means reading the size property of the original image, creating a new canvas at that size, drawing the image in, then adding your text on top. ## Screenshots diff --git a/54-Milestone-Projects25-27/README.md b/54-Milestone-Projects25-27/README.md index 1695495..5cd6ab2 100644 --- a/54-Milestone-Projects25-27/README.md +++ b/54-Milestone-Projects25-27/README.md @@ -4,6 +4,7 @@ https://www.hackingwithswift.com/100/90 ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/guide/10/3/challenge): >Your challenge for this milestone is to create a meme generation app using UIImagePickerController, UIAlertController, and Core Graphics. If you aren’t familiar with them, memes are a simple format that shows a picture with one line of text overlaid at the top and another overlaid at the bottom. > >Your app should: diff --git a/55-CoreGraphics-Redux/README.md b/55-CoreGraphics-Redux/README.md index 53c043b..fa5e907 100644 --- a/55-CoreGraphics-Redux/README.md +++ b/55-CoreGraphics-Redux/README.md @@ -6,6 +6,8 @@ The "Learn Core Graphics" playground (see link above) contains challenges to be ## Challenges +Quotes are from the [Hacking with Swift Core Graphics Playground](https://www.hackingwithswift.com/playgrounds). + ### Drawing shapes #### Rectangles diff --git a/56-Project28/README.md b/56-Project28/README.md index 65e50ba..40bb607 100644 --- a/56-Project28/README.md +++ b/56-Project28/README.md @@ -6,6 +6,7 @@ Includes solutions to the [challenges](https://www.hackingwithswift.com/read/28/ ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/28/5/wrap-up): >1. Add a Done button as a navigation bar item that causes the app to re-lock immediately rather than waiting for the user to quit. This should only be shown when the app is unlocked. >2. Create a password system for your app so that the Touch ID/Face ID fallback is more useful. You'll need to use an alert controller with a text field like we did in project 5, and I suggest you save the password in the keychain! >3. [Challenge 3](../Project28-Challenge3) diff --git a/57-Project28-Challenge3/README.md b/57-Project28-Challenge3/README.md index 9e1f68c..4bc4b59 100644 --- a/57-Project28-Challenge3/README.md +++ b/57-Project28-Challenge3/README.md @@ -4,6 +4,7 @@ https://www.hackingwithswift.com/read/28/5/wrap-up ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/28/5/wrap-up): >Go back to project 10 (Names to Faces) and add biometric authentication so the user’s pictures are shown only when they have unlocked the app. You’ll need to give some thought to how you can hide the pictures – perhaps leave the array empty until they are authenticated? ## Screenshots diff --git a/58-Project29/README.md b/58-Project29/README.md index c78311b..515fcdf 100644 --- a/58-Project29/README.md +++ b/58-Project29/README.md @@ -6,6 +6,7 @@ Includes solutions to the [challenges](https://www.hackingwithswift.com/read/29/ ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/29/6/wrap-up): >1. Add code and UI to track the player scores across levels, then make the game end after one player has won three times. >2. Add Auto Layout rules for the UI components in our storyboard, allowing them to remain positioned neatly regardless of which iPad size is used. >3. Use the physics world’s gravity to add random wind to each level, making sure to add a label telling players the direction and strength. diff --git a/59-Project30/README.md b/59-Project30/README.md index 967fbc7..f639f2e 100644 --- a/59-Project30/README.md +++ b/59-Project30/README.md @@ -6,6 +6,7 @@ Includes solutions to the [challenges](https://www.hackingwithswift.com/read/30/ ## Challenges +From [Hacking with Swift](https://www.hackingwithswift.com/read/30/7/wrap-up): >1. Go through project 30 and remove all the force unwraps. Note: implicitly unwrapped optionals are not the same thing as force unwraps – you’re welcome to fix the implicitly unwrapped optionals too, but that’s a bonus task. >2. [Challenge 2](../60-Project30-Challenge2) >3. For a tougher challenge, take the image generation code out of cellForRowAt: generate all images when the app first launches, and use those smaller versions instead. For bonus points, combine the getDocumentsDirectory() method I introduced in project 10 so that you save the resulting cache to make sure it never happens again. diff --git a/60-Project30-Challenge2/README.md b/60-Project30-Challenge2/README.md index 505e2a4..66e8840 100644 --- a/60-Project30-Challenge2/README.md +++ b/60-Project30-Challenge2/README.md @@ -8,6 +8,7 @@ Bonus: improve scrolling performance. ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/read/30/7/wrap-up): >Pick any of the previous 29 projects that interests you, and try exploring it using the Allocations instrument. Can you find any objects that are persistent when they should have been destroyed? ## Screenshots diff --git a/61-Milestone-Projects28-30/Milestone-Projects28-30.xcodeproj/project.pbxproj b/61-Milestone-Projects28-30/Milestone-Projects28-30.xcodeproj/project.pbxproj index c727f79..6e922c6 100644 --- a/61-Milestone-Projects28-30/Milestone-Projects28-30.xcodeproj/project.pbxproj +++ b/61-Milestone-Projects28-30/Milestone-Projects28-30.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 959C996322FA20CE0024C511 /* Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = 959C996222FA20CE0024C511 /* Test.swift */; }; 95C434F422F3669A00E0A92E /* Cards.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 95C434F322F3669A00E0A92E /* Cards.bundle */; }; 95D8BEC322F769B200268F7F /* CardSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95D8BEC222F769B200268F7F /* CardSize.swift */; }; 95D8BEC522F7894900268F7F /* Grid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95D8BEC422F7894900268F7F /* Grid.swift */; }; @@ -22,6 +23,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 959C996222FA20CE0024C511 /* Test.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Test.swift; sourceTree = ""; }; 95C434F322F3669A00E0A92E /* Cards.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Cards.bundle; sourceTree = ""; }; 95D8BEC222F769B200268F7F /* CardSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardSize.swift; sourceTree = ""; }; 95D8BEC422F7894900268F7F /* Grid.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Grid.swift; sourceTree = ""; }; @@ -52,6 +54,7 @@ 95ECED2C22E79C26001E70BE = { isa = PBXGroup; children = ( + 959C996222FA20CE0024C511 /* Test.swift */, 95ECED3722E79C26001E70BE /* Milestone-Projects28-30 */, 95ECED3622E79C26001E70BE /* Products */, ); @@ -159,6 +162,7 @@ files = ( 95D8BEC322F769B200268F7F /* CardSize.swift in Sources */, 95ECED3B22E79C26001E70BE /* GameViewController.swift in Sources */, + 959C996322FA20CE0024C511 /* Test.swift in Sources */, 95ECED3922E79C26001E70BE /* AppDelegate.swift in Sources */, 95E2165822E80258001B4703 /* CardCell.swift in Sources */, 95EF2C5922F5E52800D4CC0C /* SettingsViewController.swift in Sources */, diff --git a/61-Milestone-Projects28-30/README.md b/61-Milestone-Projects28-30/README.md index 87f7ee0..51d3950 100644 --- a/61-Milestone-Projects28-30/README.md +++ b/61-Milestone-Projects28-30/README.md @@ -8,6 +8,7 @@ Blocks assets under [CC0 License](https://creativecommons.org/publicdomain/zero/ ## Challenge +From [Hacking with Swift](https://www.hackingwithswift.com/guide/11/3/challenge): >Your challenge is to create a memory pairs game that has players find pairs of cards – it’s sometimes called Concentration, Pelmanism, or Pairs. At the very least you should: > >- Come up with a list of pairs. Traditionally this is two pictures, but you could also use capital cities (e.g. one card says France and its match says Paris), languages (e.g one card says “hello” and the other says “bonjour”), and so on. diff --git a/61-Milestone-Projects28-30/Test.swift b/61-Milestone-Projects28-30/Test.swift new file mode 100644 index 0000000..3f08985 --- /dev/null +++ b/61-Milestone-Projects28-30/Test.swift @@ -0,0 +1,15 @@ +// +// Test.swift +// Milestone-Projects28-30 +// +// Created by clarknt on 2019-08-06. +// Copyright © 2019 clarknt. All rights reserved. +// + +import Foundation + +class Test { + var property: String + + +}