WIP - Complete App refactoring
This commit is contained in:
@@ -11,7 +11,7 @@ import SwiftUI
|
||||
|
||||
class RecipeExporter {
|
||||
|
||||
func createPDF(recipe: RecipeDetail, image: UIImage?) -> URL? {
|
||||
func createPDF(recipe: CookbookApiRecipeDetailV1, image: UIImage?) -> URL? {
|
||||
let document = PDFDocument(format: .a4)
|
||||
|
||||
let titleStyle = PDFTextStyle(name: "title", font: UIFont.boldSystemFont(ofSize: 18), color: .black)
|
||||
@@ -82,7 +82,7 @@ class RecipeExporter {
|
||||
}
|
||||
}
|
||||
|
||||
func createText(recipe: RecipeDetail) -> String {
|
||||
func createText(recipe: CookbookApiRecipeDetailV1) -> String {
|
||||
var recipeString = ""
|
||||
recipeString.append("☛ " + recipe.name + "\n")
|
||||
recipeString.append(recipe.description + "\n\n")
|
||||
@@ -99,7 +99,7 @@ class RecipeExporter {
|
||||
return recipeString
|
||||
}
|
||||
|
||||
func createJson(recipe: RecipeDetail) -> Data? {
|
||||
func createJson(recipe: CookbookApiRecipeDetailV1) -> Data? {
|
||||
return JSONEncoder.safeEncode(recipe)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user