Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
clarknt committed Aug 7, 2019
1 parent b50f730 commit ae5d371
Show file tree
Hide file tree
Showing 57 changed files with 80 additions and 5 deletions.
1 change: 1 addition & 0 deletions 01-Project1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions 02-Project2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions 03-Project3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions 04-Project3-Challenge2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 05-Project3-Challenge3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 06-Milestone-Projects1-3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions 07-Project4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions 08-Project5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions 10-Project6b/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
1 change: 1 addition & 0 deletions 11-Milestone-Projects4-6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions 12-Project7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions 13-Project8/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions 15-Project9-Challenge1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 16-Project9-Challenge2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 17-Project9-Challenge3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 18-Milestone-Projects7-9/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 “??????”.
Expand Down
1 change: 1 addition & 0 deletions 19-Project10/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions 20-Project10-Challenge3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 21-Project11/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions 25-Project12-Challenge1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 26-Project12-Challenge2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 27-Project12-Challenge3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 28-Milestone-Projects10-12/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions 29-Project13/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions 30-Project14/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions 32-Project15-Challenge1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 33-Project15-Challenge2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 34-Project15-Challenge3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 35-Milestone-Projects13-15/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 5 additions & 4 deletions 36-Project16/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

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

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

Expand Down
1 change: 1 addition & 0 deletions 37-Project17/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions 38-Project18/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
1 change: 1 addition & 0 deletions 39-Project18-Challenges1-2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions 40-Milestone-Projects16-18/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions 41-Project19/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading

0 comments on commit ae5d371

Please sign in to comment.