Mercurial > public > lazybear
comparison LazyBear/Views/Home/HomeView.swift @ 324:3e64824cca3e
Working on HomeView
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Mon, 29 Mar 2021 20:59:41 +0200 |
parents | |
children | 2fabdc393675 |
comparison
equal
deleted
inserted
replaced
323:65f537dae6e5 | 324:3e64824cca3e |
---|---|
1 // | |
2 // HomeView.swift | |
3 // LazyBear | |
4 // | |
5 // Created by Dennis Concepción Martín on 28/3/21. | |
6 // | |
7 | |
8 import SwiftUI | |
9 | |
10 struct HomeView: View { | |
11 | |
12 var body: some View { | |
13 NavigationView { | |
14 List { | |
15 SectorRow() | |
16 .listRowInsets(EdgeInsets()) | |
17 | |
18 let keyTitles = ["Top gainers", "Top losers", "Most active"] | |
19 ForEach(keyTitles, id: \.self) { keyTitle in | |
20 TopStockRow(keyTitle: keyTitle) | |
21 | |
22 } | |
23 .listRowInsets(EdgeInsets()) | |
24 } | |
25 .navigationTitle("Home") | |
26 .navigationBarTitleDisplayMode(.inline) | |
27 .navigationViewStyle(StackNavigationViewStyle()) | |
28 } | |
29 } | |
30 } | |
31 | |
32 struct HomeView_Previews: PreviewProvider { | |
33 static var previews: some View { | |
34 HomeView() | |
35 } | |
36 } |