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
use std::rc::Rc; | |
use std::cell::RefCell; | |
#[derive(Clone)] | |
struct EZ<T> { | |
inner: Rc<RefCell<T>>, | |
} | |
impl<T> EZ<T> { | |
fn new(value: T) -> Self { |
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
import SwiftUI | |
import Foundation | |
import Combine | |
struct ContentView: View { | |
struct ImageInfo: Identifiable { | |
let id = UUID() | |
let name: String | |
init(_ name: String) { | |
self.name = name |
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
struct ContentView: View { | |
struct ImageInfo: Identifiable { | |
let id = UUID() | |
let name: String | |
init(_ name: String) { | |
self.name = name | |
} | |
} | |
let images: [ImageInfo] = [ | |
.init("image1"), |
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
import SwiftUI | |
import Foundation | |
import Combine | |
struct ContentView: View { | |
struct Mode: Identifiable { | |
let id = UUID() | |
let blend: BlendMode | |
init(_ blend: BlendMode) { | |
self.blend = blend |
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
import SwiftUI | |
import Foundation | |
import Combine | |
struct ContentView: View { | |
static let defaultIcons: [Icon] = [ | |
.init(), | |
.init(), | |
.init(), |
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
import SwiftUI | |
struct ContentView: View { | |
@State var animate = false | |
let iconSize: CGFloat = 95 | |
let iconCount = 20 | |
let iconPadding: CGFloat = 5 | |
var marqueeWidth: CGFloat { | |
(iconSize * CGFloat(iconCount)) + (iconPadding * (CGFloat(iconCount) - 1)) | |
} |
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
import SwiftUI | |
struct ContentView: View { | |
static var toggle = false | |
static let settings: [Setting] = [ | |
.push( | |
label: "Embedded content", | |
[ | |
.text(label: "Deeper!", "Here is some embedded informational text") | |
] |