-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
3c9e5a6
commit c4c3271
Showing
7 changed files
with
168 additions
and
99 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// HomeView.swift | ||
// ios-sample | ||
// | ||
// Created by Thiago dos Santos on 09/02/24. | ||
// | ||
|
||
import SwiftUI | ||
import UIKitShared | ||
|
||
struct HomeView : View { | ||
|
||
let router: Routing | ||
|
||
init(router: Routing) { | ||
self.router = router | ||
} | ||
|
||
var body: some View { | ||
VStack { | ||
Text("Hello, Home! Go to Login") | ||
.onTapGesture { | ||
router.callUri(uri: "/login", routeMethod: RouteMethodCompanion().Push) | ||
} | ||
Text("Pop Home!") | ||
.onTapGesture { | ||
router.popController(animated: true) | ||
} | ||
} | ||
} | ||
|
||
} |
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,32 @@ | ||
// | ||
// LoginView.swift | ||
// ios-sample | ||
// | ||
// Created by Thiago dos Santos on 09/02/24. | ||
// | ||
|
||
import SwiftUI | ||
import UIKitShared | ||
|
||
struct LoginView : View { | ||
|
||
let router: Routing | ||
|
||
init(router: Routing) { | ||
self.router = router | ||
} | ||
|
||
var body: some View { | ||
VStack { | ||
Text("Hello, Login! Go to Home") | ||
.onTapGesture { | ||
router.callUri(uri: "/home", routeMethod: RouteMethodCompanion().ReplaceAll) | ||
} | ||
Text("Pop Login!") | ||
.onTapGesture { | ||
router.popController(animated: true) | ||
} | ||
} | ||
} | ||
|
||
} |
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,58 @@ | ||
// | ||
// MyLogger.swift | ||
// ios-sample | ||
// | ||
// Created by Thiago dos Santos on 09/02/24. | ||
// | ||
|
||
import os | ||
import UIKitShared | ||
|
||
class MyLogger : UIKitShared.Logger { | ||
|
||
private let logger = Logger() | ||
|
||
var level: UIKitShared.LogLevel = .trace | ||
|
||
init() {} | ||
|
||
func debug(message: String) { | ||
logger.debug("\(message)") | ||
} | ||
|
||
func debug(message: String, cause: KotlinThrowable) { | ||
logger.debug("\(message) -> \(cause)") | ||
} | ||
|
||
func error(message: String) { | ||
logger.error("\(message)") | ||
} | ||
|
||
func error(message: String, cause: KotlinThrowable) { | ||
logger.error("\(message) -> \(cause)") | ||
} | ||
|
||
func info(message: String) { | ||
logger.info("\(message)") | ||
} | ||
|
||
func info(message: String, cause: KotlinThrowable) { | ||
logger.info("\(message) -> \(cause)") | ||
} | ||
|
||
func trace(message: String) { | ||
logger.trace("\(message)") | ||
} | ||
|
||
func trace(message: String, cause: KotlinThrowable) { | ||
logger.trace("\(message) -> \(cause)") | ||
} | ||
|
||
func warn(message: String) { | ||
logger.warning("\(message)") | ||
} | ||
|
||
func warn(message: String, cause: KotlinThrowable) { | ||
logger.warning("\(message) -> \(cause)") | ||
} | ||
} |
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