Skip to content

Commit

Permalink
Some additional tweaks to starter code
Browse files Browse the repository at this point in the history
  • Loading branch information
profh committed Oct 12, 2020
1 parent 8c4170a commit 0a1299e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
5 changes: 1 addition & 4 deletions SwiftRepos/View Model/ViewModel.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

class ViewModel {
class ViewModel: ObservableObject {

// instance of parser

Expand All @@ -10,9 +10,6 @@ class ViewModel {
// var filteredRepos

// MARK: Methods
func update() {

}

func search(searchText: String) {

Expand Down
11 changes: 4 additions & 7 deletions SwiftRepos/Views/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ struct ContentView: View {
// @State var displayedRepos

var body: some View {
return NavigationView {
VStack{
// TextField (Search Bar)
// List
Spacer()
}.onAppear(perform: self.displayRepos)
}

Text("Hello World!")
// replace the generic text above with a VStack as instructed

}

func displayRepos() {
Expand Down
3 changes: 2 additions & 1 deletion SwiftRepos/Views/RepositoryRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import SwiftUI

struct RepositoryRow: View {
var body: some View {
// display a repository's name and decription
// display a repository's name and decription instead of generic Hello World! text
Text("Hello World!")
}
}

0 comments on commit 0a1299e

Please sign in to comment.