-
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.
search bar añadida y notificaciones locales
- Loading branch information
1 parent
594eac0
commit 7091954
Showing
12 changed files
with
165 additions
and
15 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
+47 Bytes
(100%)
...ect.xcworkspace/xcuserdata/miguelferrerfornali.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
6 changes: 6 additions & 0 deletions
6
...xcodeproj/xcuserdata/miguelferrerfornali.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
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,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Bucket | ||
uuid = "1E3F7161-B6F1-4B62-9FEC-6C9912399FA2" | ||
type = "1" | ||
version = "2.0"> | ||
</Bucket> |
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,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "swift.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,54 @@ | ||
// | ||
// SearchBar.swift | ||
// MVVM | ||
// | ||
// Created by Miguel Ferrer Fornali on 1/2/21. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct SearchBar: View { | ||
|
||
@Binding var text: String | ||
@State private var isEditing = false | ||
|
||
var body: some View { | ||
HStack { | ||
TextField("Search ...", text: $text) | ||
.padding(7) | ||
.padding(.horizontal, 25) | ||
.background(Color(.systemGray6)) | ||
.cornerRadius(8) | ||
.disableAutocorrection(true) | ||
.overlay( | ||
HStack { | ||
Image(systemName: "magnifyingglass") | ||
.foregroundColor(.gray) | ||
.frame(minWidth: 0, maxWidth: .infinity, alignment: .leading) | ||
.padding(.leading, 8) | ||
|
||
if isEditing && !text.isEmpty { | ||
Button(action: { | ||
self.text = "" | ||
|
||
}) { | ||
Image(systemName: "multiply.circle.fill") | ||
.foregroundColor(.gray) | ||
.padding(.trailing, 8) | ||
} | ||
} | ||
} | ||
) | ||
.padding(.horizontal, 10) | ||
.onTapGesture { | ||
self.isEditing = true | ||
} | ||
} | ||
} | ||
} | ||
|
||
struct SearchBar_Previews: PreviewProvider { | ||
static var previews: some View { | ||
SearchBar(text: .constant("")) | ||
} | ||
} |
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