-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
379 additions
and
8 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
+16.9 KB
(160%)
RM Client.xcworkspace/xcuserdata/yazantarifi.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
38 changes: 38 additions & 0 deletions
38
RM Client/Assets.xcassets/PrimaryColor.colorset/Contents.json
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,38 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "display-p3", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "1.000", | ||
"green" : "0.813", | ||
"red" : "0.061" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
}, | ||
{ | ||
"appearances" : [ | ||
{ | ||
"appearance" : "luminosity", | ||
"value" : "dark" | ||
} | ||
], | ||
"color" : { | ||
"color-space" : "display-p3", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "1.000", | ||
"green" : "0.813", | ||
"red" : "0.061" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
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,59 @@ | ||
// | ||
// RmBaseVC.swift | ||
// RM Client | ||
// | ||
// Created by Yazan Tarifi on 31/08/2023. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
public class RmBaseVC : UIViewController { | ||
|
||
public override func viewDidLoad() { | ||
super.viewDidLoad() | ||
view?.backgroundColor = .systemBackground | ||
onScreenStarted() | ||
} | ||
|
||
public func onPushViewController(vc: RmBaseVC) { | ||
self.navigationController?.pushViewController(vc, animated: true) | ||
} | ||
|
||
public func onPushViewController(vc: UITableViewController) { | ||
self.navigationController?.pushViewController(vc, animated: true) | ||
} | ||
|
||
public func onCenterViewConstraints(targetView: UIView) { | ||
NSLayoutConstraint.activate([ | ||
targetView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor), | ||
targetView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor), | ||
targetView.rightAnchor.constraint(equalTo: view.safeAreaLayoutGuide.rightAnchor), | ||
targetView.leftAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leftAnchor), | ||
]) | ||
} | ||
|
||
public func onPushPresentStackView(vc: RmBaseVC) { | ||
self.present(vc, animated: true, completion: nil) | ||
} | ||
|
||
public func onScreenStarted() { | ||
if !getTitle().isEmpty { | ||
title = getTitle() | ||
} | ||
|
||
if isLargeToolbarEnabled() { | ||
navigationController?.navigationBar.prefersLargeTitles = true | ||
navigationItem.largeTitleDisplayMode = .automatic | ||
} | ||
} | ||
|
||
public func isLargeToolbarEnabled() -> Bool { | ||
return true | ||
} | ||
|
||
public func getTitle() -> String { | ||
return "Rick And Morty" | ||
} | ||
|
||
} |
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,28 @@ | ||
// | ||
// AuthScreenVC.swift | ||
// RM Client | ||
// | ||
// Created by Yazan Tarifi on 31/08/2023. | ||
// | ||
|
||
import UIKit | ||
|
||
class AuthScreenVC: RmBaseVC { | ||
|
||
public static func getInstance() -> AuthScreenVC { | ||
return AuthScreenVC() | ||
} | ||
|
||
override func onScreenStarted() { | ||
super.onScreenStarted() | ||
let text = UITextView() | ||
text.text = "Auth" | ||
|
||
view?.addSubview(text) | ||
} | ||
|
||
override func getTitle() -> String { | ||
return "Login" | ||
} | ||
|
||
} |
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,20 @@ | ||
// | ||
// HomeScreenVC.swift | ||
// RM Client | ||
// | ||
// Created by Yazan Tarifi on 31/08/2023. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
public class HomeScreenVC: UITableViewController { | ||
|
||
public static func getInstance() -> HomeScreenVC { | ||
return HomeScreenVC() | ||
} | ||
|
||
public override func viewDidLoad() { | ||
super.viewDidLoad() | ||
} | ||
} |
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,25 @@ | ||
// | ||
// OnBoardingScreenVC.swift | ||
// RM Client | ||
// | ||
// Created by Yazan Tarifi on 31/08/2023. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
public class OnBoardingScreenVC: RmBaseVC { | ||
|
||
public static func getInstance() -> OnBoardingScreenVC { | ||
return OnBoardingScreenVC() | ||
} | ||
|
||
public override func onScreenStarted() { | ||
super.onScreenStarted() | ||
} | ||
|
||
public override func getTitle() -> String { | ||
return "Welcome" | ||
} | ||
|
||
} |
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
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
Oops, something went wrong.