Skip to content

Commit 624b8d2

Browse files
committed
Ch20 3E
1 parent 1abb0b1 commit 624b8d2

File tree

67 files changed

+112
-94
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+112
-94
lines changed

20-in-practice-building-a-complete-app/projects/challenge/final/ChuckNorrisJokes/App/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// Copyright (c) 2020 Razeware LLC
1+
/// Copyright (c) 2021 Razeware LLC
22
///
33
/// Permission is hereby granted, free of charge, to any person obtaining a copy
44
/// of this software and associated documentation files (the "Software"), to deal

20-in-practice-building-a-complete-app/projects/challenge/final/ChuckNorrisJokes/App/SceneDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// Copyright (c) 2020 Razeware LLC
1+
/// Copyright (c) 2021 Razeware LLC
22
///
33
/// Permission is hereby granted, free of charge, to any person obtaining a copy
44
/// of this software and associated documentation files (the "Software"), to deal

20-in-practice-building-a-complete-app/projects/challenge/final/ChuckNorrisJokes/ChuckNorrisJokesStyleKit.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// Copyright (c) 2020 Razeware LLC
1+
/// Copyright (c) 2021 Razeware LLC
22
///
33
/// Permission is hereby granted, free of charge, to any person obtaining a copy
44
/// of this software and associated documentation files (the "Software"), to deal

20-in-practice-building-a-complete-app/projects/challenge/final/ChuckNorrisJokes/Models/JokeManagedObject+.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// Copyright (c) 2020 Razeware LLC
1+
/// Copyright (c) 2021 Razeware LLC
22
///
33
/// Permission is hereby granted, free of charge, to any person obtaining a copy
44
/// of this software and associated documentation files (the "Software"), to deal

20-in-practice-building-a-complete-app/projects/challenge/final/ChuckNorrisJokes/Views/HUDView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// Copyright (c) 2020 Razeware LLC
1+
/// Copyright (c) 2021 Razeware LLC
22
///
33
/// Permission is hereby granted, free of charge, to any person obtaining a copy
44
/// of this software and associated documentation files (the "Software"), to deal

20-in-practice-building-a-complete-app/projects/challenge/final/ChuckNorrisJokes/Views/JokeCardView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// Copyright (c) 2020 Razeware LLC
1+
/// Copyright (c) 2021 Razeware LLC
22
///
33
/// Permission is hereby granted, free of charge, to any person obtaining a copy
44
/// of this software and associated documentation files (the "Software"), to deal

20-in-practice-building-a-complete-app/projects/challenge/final/ChuckNorrisJokes/Views/JokeView.swift

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// Copyright (c) 2020 Razeware LLC
1+
/// Copyright (c) 2021 Razeware LLC
22
///
33
/// Permission is hereby granted, free of charge, to any person obtaining a copy
44
/// of this software and associated documentation files (the "Software"), to deal
@@ -143,15 +143,19 @@ struct JokeView: View {
143143
self.viewModel.reset()
144144
default:
145145
if decisionState == .liked {
146-
JokeManagedObject.save(joke: viewModel.joke,
147-
inViewContext: viewContext)
146+
JokeManagedObject.save(
147+
joke: viewModel.joke,
148+
inViewContext: viewContext
149+
)
148150
}
149151

150152
// 3
151153
let translation = change.translation
152154
let offset = (decisionState == .liked ? 2 : -2) * bounds.width
153-
cardTranslation = CGSize(width: translation.width + offset,
154-
height: translation.height)
155+
cardTranslation = CGSize(
156+
width: translation.width + offset,
157+
height: translation.height
158+
)
155159
showJokeView = false
156160

157161
// 4

20-in-practice-building-a-complete-app/projects/challenge/final/ChuckNorrisJokes/Views/LargeInlineButton.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// Copyright (c) 2020 Razeware LLC
1+
/// Copyright (c) 2021 Razeware LLC
22
///
33
/// Permission is hereby granted, free of charge, to any person obtaining a copy
44
/// of this software and associated documentation files (the "Software"), to deal

20-in-practice-building-a-complete-app/projects/challenge/final/ChuckNorrisJokes/Views/SavedJokesView.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// Copyright (c) 2020 Razeware LLC
1+
/// Copyright (c) 2021 Razeware LLC
22
///
33
/// Permission is hereby granted, free of charge, to any person obtaining a copy
44
/// of this software and associated documentation files (the "Software"), to deal
@@ -44,8 +44,10 @@ struct SavedJokesView: View {
4444
}
4545
.onDelete { indices in
4646
// 2
47-
self.jokes.delete(at: indices,
48-
inViewContext: self.viewContext)
47+
self.jokes.delete(
48+
at: indices,
49+
inViewContext: self.viewContext
50+
)
4951
}
5052
}
5153
.navigationBarTitle("Saved Jokes")

20-in-practice-building-a-complete-app/projects/challenge/final/ChuckNorrisJokesModel/ChuckNorrisJokesModel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// Copyright (c) 2020 Razeware LLC
1+
/// Copyright (c) 2021 Razeware LLC
22
///
33
/// Permission is hereby granted, free of charge, to any person obtaining a copy
44
/// of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)