This is the first app I have written using Swift to learn more about the language and possibilities.
- XCode 12.4
- iOS 14.4
- Tasty API Token
- Clone this project
- Open project with XCode
- Specify tasty api token inside
SwiftRecipes/Configs/Development.xcconfig
- Build the project and enjoy! ๐
Retrieve one single recipe
TastyAPI().fetchSingleRecipe(id: 7109) { recipe in
if let recipe = recipe {
print(recipe)
}
}
Retrieve first 20 recipes that are under 30 minutes to make
TastyAPI().fetchRecipes(query: "from=0&size=20&tags=under_30_minutes") { recipes in
print(recipes)
}
- Ultimate Guide to JSON Parsing with Swift
- function with dataTask returning a value
- What is escaping closure and when to use it
- Let's Set Up Your iOS Environments
- How to turn XCode color assets (.xcassets) into UIColor extension
- Creating the basic UI: UITabBarController โ Whitehouse Petitions, part 2
- How to repeat a string
- Computed Properties
- Adding a Custom Font to Your App
- Change tab bar item selected color in a storyboard
- Change color of Back button in navigation bar
- Adding Padding To A Stack View
- UIScrollView with Content Layout Guides
- Creating a Free Form View Controller
- How to add Padding in UILabel in iOS using Swift
- Loading/Downloading image from URL on Swift
- How to Store a Custom Object in User Defaults in Swift