@lorrden I don’t think you can do that with a SwiftUI native Map. For a Mac app I used a NSViewRepresentable for my map view. I subclassed MKMapView where I added this in an override of mouseUp
// start a timer for this location. The location will be marked
// when the timer fires unless this is a double click
let point = convert(theEvent.locationInWindow, from: nil)
let coords = convert(point, toCoordinateFrom: self)
clickTimer = Timer.scheduledTimer(timeInterval:
NSEvent.doubleClickInterval,
target: self,
selector: #selector(self.clicked),
userInfo: coords, repeats: false)
Not sure if something like that could be easily converted to iOS.
Another #SwiftUI question: how does one respond to standard main menu entries (Commands) like “Select All”?
https://developer.apple.com/forums/thread/677737
I tried `.onCommand(#selector(NSStandardKeyBindingResponding.selectAll)) { .. }`, but that doesn’t get triggered.
#Development #Introductions
How to write Semantic CSS · Most people understand semantic HTML, but semantic CSS? https://ilo.im/10xyew
_____
#WebDevelopment #WebDev #Frontend #CSS #StyleSheet #SemanticCSS #Accessibility #A11y #Selector
#development #introductions #webdevelopment #webdev #frontend #css #stylesheet #semanticcss #accessibility #a11y #selector
#Development #Introductions
How to write Semantic CSS · Most people understand semantic HTML, but semantic CSS? https://ilo.im/10xyew
_____
#WebDevelopment #WebDev #Frontend #CSS #StyleSheet #SemanticCSS #Accessibility #A11y #Selector
#development #introductions #webdevelopment #webdev #frontend #css #stylesheet #semanticcss #accessibility #a11y #selector
#Development #Tools
The truth about CSS selector performance · Edge’s DevTools can now measure the impact of CSS selectors on page speed https://ilo.im/10issq
_____
#WebDevelopment #WebDev #WebPerformance #WebPerf #Browser #Microsoft #Edge #DevTool #Frontend #CSS #Selector
#development #tools #webdevelopment #webdev #webperformance #webperf #browser #microsoft #edge #devtool #frontend #css #selector
Update on my battle between swizzling and #SwiftLang's new concurrency rules. It took 3.5 hours, but I finally found a workaround.
Where I had
private static func swizzleMocks() {…}
I now have
private nonisolated static func swizzleMocksIgnoringActorIsolation() {
perform(#selector(swizzleMocks))
}
@objc private static func swizzleMocks() {…}
I'm skirting around Swift by doing a perform selector via the Obj-C runtime.
Besides that, I declared the test spies as MainActor, and also the test suites.
★ CSS :has() feature detection with @supports(selector(…)): You want :has(+ *), not :has(*)
by @bramus @bramus@front-end.social
#css #has #selector #webdev
https://www.bram.us/2023/01/04/css-has-feature-detection-with-supportsselector-you-want-has-not-has/
a programmer's poem
func checkHappiness() -> Void {
let a = life.thingsGettingBetter().count
let b = life.thingsGettingWorse().count
if a > b {
print("You are delusional")
} else if a < b {
print("You are paranoid")
} else {
// a == b
print("That's life")
}
Timer.scheduledTimer(withTimeInterval: 3600, target: self, selector: #selector(checkHappiness), userInfo: userInfo, repeats: false)
}
a programmer's poem
func checkHappiness() -> Void {
let a = life.thingsGettingBetter
let b = life.thingsGettingWorse
if a > b {
print("You are delusional")
} else if a < b {
print("You are paranoid")
} else {
// a == b
print("That's life")
}
Timer.scheduledTimer(withTimeInterval: 3600, target: self, selector: #selector(checkHappiness), userInfo: userInfo, repeats: false)
}
¡Arrancando un stream improvisado de música house!
https://www.twitch.tv/dj_innerdrum
#dj #musica #música#twitch #housemusic #NoMic #selector #argentina
#dj #musica #housemusic #NoMic #selector #argentina
¡Arranca otro jueves de música House!
https://www.twitch.tv/dj_innerdrum
#dj #musica #música#twitch #housemusic #NoMic #selector
#dj #musica #housemusic #NoMic #selector
¡Arranca otro jueves de música House!
https://www.twitch.tv/dj_innerdrum
#dj #musica #música#twitch #housemusic #NoMic #selector
#dj #musica #música #housemusic #NoMic #selector
:where() :is() :has()? New CSS selectors that make your life easier - This post show us how to use the new CSS selector :where() :is() :has() to make our... https://polypane.app/blog/where-is-has-new-css-selectors-that-make-your-life-easier/ #Front #CSS #Selector by @Polypane@twitter.com