Skip to content

Commit

Permalink
code improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamalifard, Mehran committed Apr 30, 2024
1 parent e2ff80b commit 1655c6c
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions EasyCrypto.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1504,7 +1504,7 @@
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI
struct CoinDetailHeaderView: View {

var item: CoinUnit

var url: ((String?) -> Void)

var body: some View {
Expand Down
4 changes: 2 additions & 2 deletions EasyCrypto/Presentation/CoinDetail/View/CoinDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct CoinDetailView: Coordinatable {
@State private var alertMessage: String = ""

let subscriber = Cancelable()

var id: String?
var coinData: CoinUnit {
return self.viewModel.coinData
Expand All @@ -39,7 +39,7 @@ struct CoinDetailView: Coordinatable {
}

var content: some View {
NavigationView {
NavigationStack {
GeometryReader { geo in
let geoSize = geo.size
ZStack {
Expand Down
4 changes: 2 additions & 2 deletions EasyCrypto/Presentation/Detail/View/PriceView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import SwiftUI
struct PriceView: View {

let item: MarketsPrice

var viewModel: DetailViewModel

@State var isPersist: Bool = false
@State private var isPersist: Bool = false

var body: some View {
VStack {
Expand Down
5 changes: 3 additions & 2 deletions EasyCrypto/Presentation/Main/View/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct MainView: Coordinatable {
static let cornerRadius: CGFloat = 10
}

@State var tabIndex = 0
@State private var tabIndex = 0
@State private var shouldShowDropdown = false
@State private var searchText: String = .empty
@State private var isLoading: Bool = false
Expand All @@ -34,7 +34,7 @@ struct MainView: Coordinatable {
}

var content: some View {
NavigationView {
NavigationStack {
ZStack {
Color.darkBlue
.edgesIgnoringSafeArea(.all)
Expand Down Expand Up @@ -78,6 +78,7 @@ struct MainView: Coordinatable {
self.showAlert(viewModel.errorTitle, alertMessage)
}
}
.edgesIgnoringSafeArea(.bottom)
}
.navigationBarTitle(viewModel.title, displayMode: .inline)
.navigationBarColor(backgroundColor: .clear, titleColor: .white)
Expand Down
1 change: 1 addition & 0 deletions EasyCrypto/Presentation/Main/View/SearchBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import SwiftUI
struct SearchBar: View {

@State var isLoading: Bool

@Binding var text: String
@Binding var isEditing: Bool

Expand Down
2 changes: 1 addition & 1 deletion EasyCrypto/Presentation/Main/View/SortView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI
struct SortView: View {

@ObservedObject var viewModel: MainViewModel

@State var viewState: Bool = false

var body: some View {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import SwiftUI
struct HandleViewModelStateModifier: ViewModifier {

@ObservedObject var viewModel: DefaultViewModel

@Binding var isLoading: Bool
@Binding var alertMessage: String
@Binding var presentAlert: Bool
Expand Down
1 change: 1 addition & 0 deletions EasyCrypto/Support/ViewModifier/ViewDidLoadModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import SwiftUI

public struct ViewDidLoadModifier: ViewModifier {

@State private var viewDidLoad = false
let action: (() -> Void)?

Expand Down

0 comments on commit 1655c6c

Please sign in to comment.