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
// | |
// CardView.swift | |
// | |
// Created by Ernest Cunningham on 27/05/20. | |
// | |
import SwiftUI | |
struct CardView<CardContent: View>: View { | |
@Environment(\.colorScheme) var mode |
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
// 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 { |