Skip to content

Instantly share code, notes, and snippets.

@sturdysturge
Created February 8, 2021 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sturdysturge/a0d6cc8bfc95215aa964603e8c3fae7e to your computer and use it in GitHub Desktop.
Save sturdysturge/a0d6cc8bfc95215aa964603e8c3fae7e to your computer and use it in GitHub Desktop.
struct TickerDetailView: View {
@EnvironmentObject var dataModel: DataModel
let index: Int
var body: some View {
Group {
if let image = dataModel.image {
Image(uiImage: image)
.resizable()
.scaledToFit()
}
if let ticker = dataModel.tickerData?.tickers[index] {
TickerTextView(ticker: ticker)
}
Spacer()
RefreshView()
}
.padding()
.frame(maxHeight: .infinity)
.background(Color.white)
.foregroundColor(.black)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment