Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!
NOTE: that this is current, 10/1/2021 state.
- Install Xcode from App Store or install Command Line Tools on your Mac
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>UnifiedBar</key> | |
<dict> | |
<key>DisclosureRequired</key> | |
<string>ace440ac-b4f6-4b43-aade-02bba1589aef</string> | |
<key>Enabled</key> | |
<false/> |
/** | |
* I needed a property wrapper that fulfilled the following four requirements: | |
* | |
* 1. Values are stored in UserDefaults. | |
* 2. Properties using the property wrapper can be used with SwiftUI. | |
* 3. The property wrapper exposes a Publisher to be used with Combine. | |
* 4. The publisher is only called when the value is updated and not | |
* when_any_ value stored in UserDefaults is updated. | |
* | |
* First I tried using SwiftUI's builtin @AppStorage property wrapper |
Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!
NOTE: that this is current, 10/1/2021 state.
struct ReviewTabView: View { | |
var reviews: [Review] = [ | |
Review(title: "Great app", reviewer: "Maartje Derks", text: "This app really makes my life so much easier. Can't wait to use it."), | |
Review(title: "Great app", reviewer: "Maartje Derks", text: "This app really makes my life so much easier. Can't wait to use it."), | |
Review(title: "Great app", reviewer: "Maartje Derks", text: "This app really makes my life so much easier. Can't wait to use it."), | |
Review(title: "Great app", reviewer: "Maartje Derks", text: "This app really makes my life so much easier. Can't wait to use it."), | |
] | |
@State var selectedIndex = 0 | |
@State var timer = Timer.publish(every: 4, on: .main, in: .common).autoconnect() |
@bpteague Has an excellent update solution as of February 2025 using modern tools and an updated workflow.
This gist will remain here, but is deprecated. I'll keep it here historical and link-preservation purposes only. I strongly encourage everyone to check out the solution above!
import SwiftUI | |
import PlaygroundSupport | |
struct ContentView: View { | |
@State var gradientAngle: Double = 0 | |
var colors = [ | |
Color(UIColor.systemRed), | |
Color(UIColor.systemOrange), | |
Color(UIColor.systemYellow), | |
Color(UIColor.systemGreen), |
// | |
// Debug.swift | |
// | |
// Created by Craig Hockenberry on 3/15/17. | |
// Updated by Craig Hockenberry on 2/20/24. | |
// Usage: | |
// | |
// SplineReticulationManager.swift: | |
// |
Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.
setInterval(() => {
for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
d.click()
}
import SwiftUI | |
import Combine | |
struct AdaptsToSoftwareKeyboard: ViewModifier { | |
@State var currentHeight: CGFloat = 0 | |
func body(content: Content) -> some View { | |
content | |
.padding(.bottom, currentHeight) | |
.edgesIgnoringSafeArea(.bottom) |
{ | |
var SQL = { | |
listToString: function(x, xs) { | |
return [x].concat(xs).join(""); | |
} | |
}; | |
} | |
Start | |
= Stmt |