aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Contents.json18
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.pngbin0 -> 559 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.pngbin0 -> 1231 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.pngbin0 -> 1824 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.pngbin0 -> 881 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.pngbin0 -> 1776 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.pngbin0 -> 1776 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.pngbin0 -> 2726 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x-1.pngbin0 -> 1231 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.pngbin0 -> 1231 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.pngbin0 -> 2444 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.pngbin0 -> 2444 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.pngbin0 -> 3671 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.pngbin0 -> 3671 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.pngbin0 -> 5800 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.pngbin0 -> 2328 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.pngbin0 -> 4692 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.pngbin0 -> 5267 bytes
-rw-r--r--Qrious/Assets.xcassets/AppIcon.appiconset/Qrious.pngbin0 -> 21408 bytes
-rw-r--r--Qrious/ContentView.swift24
-rw-r--r--Qrious/DetailedView.swift2
21 files changed, 41 insertions, 3 deletions
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Contents.json b/Qrious/Assets.xcassets/AppIcon.appiconset/Contents.json
index 9221b9b..8a8b2f9 100644
--- a/Qrious/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -1,91 +1,109 @@
{
"images" : [
{
+ "filename" : "Icon-App-20x20@2x.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
+ "filename" : "Icon-App-20x20@3x.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
+ "filename" : "Icon-App-29x29@2x.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
+ "filename" : "Icon-App-29x29@3x.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
+ "filename" : "Icon-App-40x40@2x.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
+ "filename" : "Icon-App-40x40@3x.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
+ "filename" : "Icon-App-60x60@2x.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
+ "filename" : "Icon-App-60x60@3x.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
+ "filename" : "Icon-App-20x20@1x.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
+ "filename" : "Icon-App-40x40@1x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
+ "filename" : "Icon-App-29x29@1x.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
+ "filename" : "Icon-App-29x29@2x-1.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
+ "filename" : "Icon-App-40x40@1x-1.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
+ "filename" : "Icon-App-40x40@2x-1.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
+ "filename" : "Icon-App-76x76@1x.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
+ "filename" : "Icon-App-76x76@2x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
+ "filename" : "Icon-App-83.5x83.5@2x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
+ "filename" : "Qrious.png",
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 0000000..2f925fc
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 0000000..f1c205b
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 0000000..b03a82b
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 0000000..5681b84
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png
new file mode 100644
index 0000000..8eafeb0
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 0000000..8eafeb0
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 0000000..c3912fe
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x-1.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x-1.png
new file mode 100644
index 0000000..f1c205b
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x-1.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 0000000..f1c205b
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png
new file mode 100644
index 0000000..5546f5a
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 0000000..5546f5a
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 0000000..670f6c5
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 0000000..670f6c5
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 0000000..a447ee4
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 0000000..8241ba9
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 0000000..296d0ed
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 0000000..fbfdf07
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
Binary files differ
diff --git a/Qrious/Assets.xcassets/AppIcon.appiconset/Qrious.png b/Qrious/Assets.xcassets/AppIcon.appiconset/Qrious.png
new file mode 100644
index 0000000..fee6c99
--- /dev/null
+++ b/Qrious/Assets.xcassets/AppIcon.appiconset/Qrious.png
Binary files differ
diff --git a/Qrious/ContentView.swift b/Qrious/ContentView.swift
index 2af0f96..87c7eb2 100644
--- a/Qrious/ContentView.swift
+++ b/Qrious/ContentView.swift
@@ -81,6 +81,25 @@ extension UIApplication {
}
}
+struct ClearButton: ViewModifier
+{
+ @Binding var text: String
+ public func body(content: Content) -> some View{
+ ZStack(alignment: .trailing){
+ content
+ if !text.isEmpty{
+ Button(action:{
+ self.text = ""
+ }){
+ Image(systemName: "delete.left")
+ .foregroundColor(Color(UIColor.opaqueSeparator))
+ }
+ .padding(.trailing, 8)
+ }
+ }
+ }
+}
+
class configuration: ObservableObject {
@Published var question: String = "Results show what are the compounds?"
}
@@ -114,7 +133,7 @@ struct ContentView: View {
Form{
Section(header: Text("Search Query")){
- TextField("Search Query",text: $query)
+ TextField("Search Query",text: $query).modifier(ClearButton(text: $query))
}
@@ -123,6 +142,7 @@ struct ContentView: View {
HStack{
Text("No. Of Articles:")
TextField("No. Of Articles", text: $noOfArticles)
+ .modifier(ClearButton(text: $noOfArticles))
.keyboardType(.numberPad)
}.disabled(!advance)
HStack{
@@ -134,7 +154,7 @@ struct ContentView: View {
}
Section(header: Text("Query for AI Model")){
- TextField("",text: $ques, onEditingChanged: {_ in self.config.question = self.ques})
+ TextField("",text: $ques, onEditingChanged: {_ in self.config.question = self.ques}).modifier(ClearButton(text: $ques))
}
diff --git a/Qrious/DetailedView.swift b/Qrious/DetailedView.swift
index ee08bf0..d8fd751 100644
--- a/Qrious/DetailedView.swift
+++ b/Qrious/DetailedView.swift
@@ -53,7 +53,7 @@ struct DetailedView: View {
self.description1 = decodedData["description"].string!
self.paperURL = decodedData["figshare_url"].string!
print("Finding Answer")
- self.candidates = String(BERT().findAnswer(for: configuration().question, in: self.description1))
+ self.candidates = String(BERT().findAnswer(for: self.config.question, in: self.description1))
//return decodedData
}