List your top 1-3 problems.
List how these problems are solved today.
| struct FloatingTextField: View { | |
| let title: String | |
| let text: Binding<String> | |
| var body: some View { | |
| ZStack(alignment: .leading) { | |
| Text(title) | |
| .foregroundColor(text.wrappedValue.isEmpty ? Color(.placeholderText) : .accentColor) | |
| .offset(y: text.wrappedValue.isEmpty ? 0 : -25) | |
| .scaleEffect(text.wrappedValue.isEmpty ? 1 : 0.75, anchor: .leading) |
| struct FloatingTextField: View { | |
| let title: String | |
| let text: Binding<String> | |
| var body: some View { | |
| ZStack(alignment: .leading) { | |
| Text(title) | |
| .foregroundColor(Color(.placeholderText)) | |
| .offset(y: text.wrappedValue.isEmpty ? 0 : -25) | |
| .scaleEffect(text.wrappedValue.isEmpty ? 1 : 0.8, anchor: .leading) |
| struct FloatingTextField: View { | |
| let title: String | |
| let text: Binding<String> | |
| var body: some View { | |
| VStack(alignment: .leading, spacing: 2) { | |
| Text(title) | |
| .font(.caption) | |
| .foregroundColor(Color(.placeholderText)) | |
| .opacity(text.wrappedValue.isEmpty ? 0 : 1) |
| struct FloatingTextField: View { | |
| let title: String | |
| let text: Binding<String> | |
| var body: some View { | |
| VStack(alignment: .leading, spacing: 2) { | |
| Text(title) | |
| .font(.caption) | |
| .foregroundColor(Color(.placeholderText)) | |
| TextField(title, text: text) |
| [ | |
| { | |
| "title": "Contovista Result 1", | |
| "summary": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", | |
| "confidence": 0.75, | |
| "provider": "Contovista", | |
| "url": "banking://contovista/overview" | |
| }, | |
| { | |
| "title": "Contovista Result 1", |
| import Foundation | |
| extension String.StringInterpolation { | |
| fileprivate static let myMeasurementFormatter: MeasurementFormatter = { | |
| let this = MeasurementFormatter() | |
| this.unitOptions = [.naturalScale] | |
| this.numberFormatter.maximumFractionDigits = 1 | |
| return this | |
| }() | |
| mutating func appendInterpolation<UnitType>(_ measurement: Measurement<UnitType>) where UnitType: Unit { |
| // | |
| // ContentView.swift | |
| // QuantityStepper | |
| // | |
| // Created by Vikram Kriplaney on 07.11.2019. | |
| // Copyright ยฉ 2019 iPhonso GmbH. All rights reserved. | |
| // | |
| import SwiftUI |
| extension URL { | |
| typealias ComponentsManipulator = (inout URLComponents) -> () | |
| func manipulate(with manipulator: ComponentsManipulator) -> URL { | |
| guard var components = URLComponents(url: self, resolvingAgainstBaseURL: true) else { return self } | |
| manipulator(&components) | |
| return components.url ?? self | |
| } | |
| /// Deletes first path component after the initial slash |
| extension KeyedDecodingContainer { | |
| func lenientDecode<T>(_ type: T.Type, forKey key: KeyedDecodingContainer.Key) throws -> T where T: Decodable & LosslessStringConvertible { | |
| do { | |
| return try decode(T.self, forKey: key) | |
| } catch { | |
| guard let stringValue = try? decode(String.self, forKey: key), let t = T(stringValue) else { throw error } | |
| return t | |
| } | |
| } | |
| } |