forked from yagom-academy/ios-diary
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
81 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// DecodingManager.swift | ||
// Diary | ||
// | ||
// Created by Maxhyunm, Hamg on 2023/08/30. | ||
// | ||
|
||
import UIKit | ||
|
||
final class DecodingManager { | ||
static func decodeData<T: Decodable>(from data: Data) throws -> T { | ||
let decoder = JSONDecoder() | ||
|
||
guard let decodedData = try? decoder.decode(T.self, from: data) else { | ||
throw DecodingError.decodingFailure | ||
} | ||
|
||
return decodedData | ||
} | ||
} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// ImageCachingManager.swift | ||
// Diary | ||
// | ||
// Created by Maxhyunm, Hamg on 2023/09/13. | ||
// | ||
|
||
import UIKit | ||
|
||
class ImageCachingManager { | ||
static let shared = NSCache<NSString, UIImage>() | ||
|
||
private init() {} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters