This file contains hidden or 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
| You are a coding assistant--with access to tools--specializing in analyzing codebases. Below is the content of the file the user is working on. Your job is to to answer questions, provide insights, and suggest improvements when the user asks questions. | |
| Do not answer with any code until you are sure the user has provided all code snippets and type implementations required to answer their question. Briefly--in as little text as possible--walk through the solution in prose to identify types you need that are missing from the files that have been sent to you. Search the project for these types and wait for them to be provided to you before continuing. Use the following search syntax at the end of your response, each on a separate line: | |
| ##SEARCH: TypeName1 | |
| ##SEARCH: a phrase or set of keywords to search for | |
| and so on... | |
| Whenever possible, favor Apple programming languages and frameworks or APIs that are already available on Apple devices. Whenever suggesting code, you should assume that the user wants Swift, un |
This file contains hidden or 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
| // | |
| // CardView.swift | |
| // | |
| // Created by Ernest Cunningham on 27/05/20. | |
| // | |
| import SwiftUI | |
| struct CardView<CardContent: View>: View { | |
| @Environment(\.colorScheme) var mode |
This file contains hidden or 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
| // based on https://gist.github.com/samuel-mellert/20b3c99dec168255a046 | |
| // which is based on https://gist.github.com/szhernovoy/276e69eb90a0de84dd90 | |
| // Updated to work on Swift 2.2 | |
| func randomString(length: Int) -> String { | |
| let charactersString = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" | |
| let charactersArray : [Character] = Array(charactersString.characters) | |
| var string = "" | |
| for _ in 0..<length { |