Post

Replies

Boosts

Views

Activity

Reply to installing Monterey in separate APFS volume?
Note: Profile installation has to be done on the current volume Profile installation Download macOS beta profile from the developer portal Install the beta profile on your existing volume (this can’t be installed on the new volume) Download macOS Beta System Preferences > Software Update now will show the macOS beta Tap on Upgrade now Downloading of the macOS beta will start Create a separate Volume https://support.apple.com/en-us/HT208891 Open Disk Utility Select Macintosh HD (top most item) Add a new volume (no need to allocate any space) Remove Profile from existing volume This is required so that macOS beta updates don’t appear on your current volume, otherwise might end up accidentally updating to macOS beta on your current volume https://beta.apple.com/sp/betaprogram/unenroll Open System Preferences > Software Update Click Details > Restore Defaults Installing macOS Beta The macOS Beta installer would ask for the location / volume Tap on show all disks to make all volumes visible Select the volume you newly created Install
Topic: Community SubTopic: Apple Developers Tags:
Oct ’21
Reply to Async/let producing error in playground? Xcode 13.0 beta
@eskimo Feedback I have file a feedback FB9546874 Versions: The issue happens with Xcode Playground (iOS) Xcode: Version 13.0 beta 5 (13A5212g) macOS: 11.5.2 (20G95) Note: The same code runs fine in a SwiftUI project Code: import UIKit func f1() async -> Int { return 10 } Task { async let a = f1() async let b = f1() let c = await a + b print("c = \(c)") } Error: error: AsyncLet.playground:8:15: error: expression is 'async' but is not marked with 'await' async let a = f1() ^ await error: AsyncLet.playground:9:15: error: expression is 'async' but is not marked with 'await' async let b = f1() ^ await
Aug ’21
Reply to How to change thread or reference of NotificationCenter's handler when observing value change
Not sure if this would help, a simpler solution would be to use a timer struct ContentView: View { @StateObject var model = Model() var body: some View { VStack { Button(!model.isStarted ? "Start" : "Stop") { model.toggle() } Text(String(model.counter)) } } } class Model: ObservableObject { @Published var counter = 0 @Published var isStarted = false private var timer: Timer? func toggle() { if isStarted { stop() } else { start() } } private func start() { timer = makeTimer() isStarted = true } private func stop() { timer?.invalidate() isStarted = false } private func makeTimer() -> Timer { Timer.scheduledTimer(withTimeInterval: 1, repeats: true) { [weak self] timer in self?.counter += 1 } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’21
Reply to LazyVGrid inside ScrollView not pinning section header
See if this meets your expectations Changes: The outer most is a horizontal scroll view Inside that you have a vertical scroll view Move the other content inside the vertical scroll view var body: some View { ScrollView(.horizontal) { ScrollView(.vertical) { Text("Other content") .frame(maxWidth: .infinity, minHeight: 100) .background(Color.yellow) LazyVGrid( columns: Array(repeating: GridItem(.fixed(200), spacing: 0, alignment: .center), count: 9), spacing: 16, pinnedViews: [.sectionHeaders] ) { Section(header: header) { ForEach(1..<500) { Text("Cell #\($0)") } } } Text("Other content") .frame(maxWidth: .infinity, minHeight: 100) .background(Color.yellow) } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’21
Reply to Google Drive & XCode Projects
Would it help to do the following? Option1 Every student creates an alias on their Mac pointing to the path of the text files In the C++ code you refer to this alias Option 2 If the Google drive path is consistent, then you could even use ~ in place of home folder and the rest of the Google drive path. That way all C++ code files could have the same path
Jul ’21