Skip to content

Commit

Permalink
Added: Function was assigned to login Button in LoginViewModel
Browse files Browse the repository at this point in the history
  • Loading branch information
tkshsbcue committed Jun 1, 2024
1 parent 960866e commit 4ef4376
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 4 deletions.
Binary file not shown.
109 changes: 109 additions & 0 deletions Tickle.xcodeproj/xcshareddata/xcschemes/Tickle.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E41219B22C05EE8D00873F6B"
BuildableName = "Tickle.app"
BlueprintName = "Tickle"
ReferencedContainer = "container:Tickle.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E41219C32C05EE8E00873F6B"
BuildableName = "TickleTests.xctest"
BlueprintName = "TickleTests"
ReferencedContainer = "container:Tickle.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E41219CD2C05EE8E00873F6B"
BuildableName = "TickleUITests.xctest"
BlueprintName = "TickleUITests"
ReferencedContainer = "container:Tickle.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E41219B22C05EE8D00873F6B"
BuildableName = "Tickle.app"
BlueprintName = "Tickle"
ReferencedContainer = "container:Tickle.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "IDEPreferLogStreaming"
value = "YES"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E41219B22C05EE8D00873F6B"
BuildableName = "Tickle.app"
BlueprintName = "Tickle"
ReferencedContainer = "container:Tickle.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,30 @@
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
<key>Tickle.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>E41219B22C05EE8D00873F6B</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>E41219C32C05EE8E00873F6B</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>E41219CD2C05EE8E00873F6B</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
Expand Down
9 changes: 9 additions & 0 deletions Tickle/LoginViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ import Foundation
class LoginViewModel:ObservableObject{
@Published var email = ""
@Published var password = ""
init(){}

func login(){
guard !email.isEmpty, !password.isEmpty else{
return
}
print("Hello there")
}
func validate(){}


}
4 changes: 2 additions & 2 deletions Tickle/loginView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ struct LoginView: View {
Text("New Here")
}
}.offset(y:-100).frame(height:230)
Button{

Button{
viewModel.login()
}label:{
Text("Login")
}
Expand Down

0 comments on commit 4ef4376

Please sign in to comment.