App Detail Info Cell
AppStore JSON APIs
Now that we can transition into the app detail page, I'd like to teach you how you can start rendering out the information cell at the top of the page. In addition, I'll go through how detailed information for an iTunes' app can be found using this endpoint: https://itunes.apple.com/lookup

Comments (10)
ayon
4 years ago
Hi Brian for far the course has been a great source of knowledge for me. Do you have any plans for refactoring the code later in the series?
Brian Voong
4 years ago
tsangaris
4 years ago
Hi Brian, Thanks again for the awesome content! Some questions: 1. Will it be safer to create a new model for the AppDetail results fetched from the iTunes API instead of using the same SearchResult? 2. Is there a chance for the app to crash if there is not a formattedPrice response from the server when we call the iTunes API inside the AppsPageController for fetching the TopGrossingApps? 3. What is the purpose of "first" when getting the results from the server? I mean its obvious, but what is the difference from using result?.results.description ? 4. Is there a best practice when creating actual view items like buttons and labels? On previous lessons you used the let nameLabel: UILabel = { ... }(). Also, here is a great article about UIStackViews: https://www.raizlabs.com/dev/2016/04/uistackview/
serxhio
4 years ago
Hey Brian, is there any way we can handle clicking on the GET button for example? I'm having a hard time implementing it right.
hwatanabe9393
4 years ago
I have question in VerticalStackView(arrangedSubviews:[nameLabel, UIStackView(arrangedSubviews: [priceButton, UIView()], UIView(), spacing: 12])], customSpacing: 20) which is what you did in very end. We haven't set any height constrain to nameLabel, but how come adding UIView() will push nameLabel and StackView to top and rest of the area is assigned to UIView()?
pdefilippi
3 years ago
Hey Brian, How did you come to the conclusion that you needed https://itunes.apple.com/lookup?id Thanks
Eduard Hilgenberg
3 years ago
Hey Brian, I like your videos so far. I'm​ wondering if you have any cheat sheet available?
Brian Voong
3 years ago
Eduard Hilgenberg
3 years ago
Hey Brian, thank you for your fast reply. (btw I didn't get any notification for your reply -> almost missed it) I would like to see the following things: * Overview of all common UI elements * Basic settings for these elements​ (maybe with some example code snippets)
Eduard Hilgenberg
3 years ago
I got another question regarding your xcode settings. When you type the stackView it looks like this: let stackView = VerticalStackView(arrangedSubviews: [ appIconImageView, whatsNewLabel, releaseNotesLabel], spacing: 16) let stackView = VerticalStackView(arrangedSubviews: [ appIconImageView, whatsNewLabel, releaseNotesLabel], spacing: 16) How did you set up​ the automatic indents?
Brian Voong
3 years ago
chibuike
3 years ago
hey brian i am still wondering why you modified the searchresult model for the app page is
Kritbovorn Taweeyossak
3 years ago
I have error when searching in ' AppSearchController.swift ' JSON Error typeMismatch(Swift.Array<Any>, Swift.DecodingError.Context(codingPath: [], debugDescription: "Expected to decode Array<Any> but found a dictionary instead.", underlyingError: nil))
Brian Voong
3 years ago
Kritbovorn Taweeyossak
3 years ago
Thank you very much sir.
seventhaxis
3 years ago
Brian, why did you choose to use a collection view for the app detail view instead of building it out as a regular view with stack views?
Brian Voong
3 years ago
Eric Agredo
3 years ago
Hey Brian, I thought it was possible to make stack views scrollable? I had the same question.
Brian Voong
3 years ago
HELP & SUPPORT