-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
item info vc subclass and UserInfoVC
- Loading branch information
grenos
committed
Apr 4, 2020
1 parent
c2b2f06
commit db5b277
Showing
7 changed files
with
105 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+5.73 KB
(110%)
...odeproj/project.xcworkspace/xcuserdata/vasilis.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
GHFollowers/Components/ViewControllers/ItemInfoVCs/GFFollowerItemVC.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// GFFollowerItemVC.swift | ||
// GHFollowers | ||
// | ||
// Created by Vasileios Gkreen on 04/04/2020. | ||
// Copyright © 2020 Vasileios Gkreen. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
// THIS CLASS IS A SUBLCLASS OF GFItemInfoVC, IT INHERITS ALL OF ITS PROPERTIES | ||
|
||
class GFFollowerItemVC: GFItemInfoVC { | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
configureItems() | ||
|
||
} | ||
|
||
private func configureItems() { | ||
// 1) get itemInfoView1 which is declarered in the superClass GFItemInfoVC | ||
// 2) itemInfoView1 is GFItemInfoView() created to hold the symbols and github info | ||
// 3) set is a func created in GFItemInfoView to controlls what info to show based on what we pass with itemInfoType | ||
// 4) the user object is passed from the superClass, which we pass from the UserInfoVC screen | ||
itemInfoView1.set(itemInfoType: .followers, withCount: user.followers) | ||
itemInfoView2.set(itemInfoType: .following, withCount: user.following) | ||
actionButton.set(backgroundColor: .systemGreen, title: "Get Followers") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
GHFollowers/Components/ViewControllers/ItemInfoVCs/GFRepoItemVC.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// GFRepoItemVC.swift | ||
// GHFollowers | ||
// | ||
// Created by Vasileios Gkreen on 04/04/2020. | ||
// Copyright © 2020 Vasileios Gkreen. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
// THIS CLASS IS A SUBLCLASS OF GFItemInfoVC, IT INHERITS ALL OF ITS PROPERTIES | ||
|
||
class GFRepoItemVC: GFItemInfoVC { | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
configureItems() | ||
|
||
} | ||
|
||
private func configureItems() { | ||
// 1) get itemInfoView1 which is declarered in the superClass GFItemInfoVC | ||
// 2) itemInfoView1 is GFItemInfoView() created to hold the symbols and github info | ||
// 3) set is a func created in GFItemInfoView to controlls what info to show based on what we pass with itemInfoType | ||
// 4) the user object is passed from the superClass, which we pass from the UserInfoVC screen | ||
itemInfoView1.set(itemInfoType: .repos, withCount: user.publicRepos) | ||
itemInfoView2.set(itemInfoType: .gists, withCount: user.publicGists) | ||
actionButton.set(backgroundColor: .systemPurple, title: "GitHub Profile") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters