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
import SwiftUI | |
fileprivate class CarouselConfig: ObservableObject { | |
@Published var cardWidth: CGFloat = 0 | |
@Published var cardCount: Int = 0 | |
@Published var selected: Int = 0 | |
} | |
struct Carousel<Cards: View>: View { | |
let cards: Cards |
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
func addingPercentEncodingForRFC3986() -> String? { | |
let unreserved = "-._~/?" | |
var allowed = CharacterSet.alphanumerics | |
allowed.insert(charactersIn: unreserved) | |
return self.addingPercentEncoding(withAllowedCharacters: allowed) | |
} |
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
// | |
// ViewController.swift | |
// TableSpring | |
// | |
// Created by Jozef Legény on 2020-01-18. | |
// Copyright © 2020 yozy. All rights reserved. | |
// | |
import UIKit |
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
2> class C { | |
3. var a = 1 | |
4. } | |
5> var arr1 = [C()] | |
arr1: [C] = 1 value { | |
[0] = { | |
a = 1 | |
} | |
} | |
6> var arr2 = arr1 |