marc · @marchyman
9 followers · 88 posts · Server sfba.social

@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: (self.clicked),
userInfo: coords, repeats: false)

Not sure if something like that could be easily converted to iOS.

#selector

Last updated 1 year ago

ppk 🇪🇺 · @ppk
2288 followers · 1207 posts · Server front-end.social

Today I will write the first few pages of the part.

My request: please tell me about your cool, non-obvious selector tricks. I'd love to include a few in the book.

#css #book #selector

Last updated 1 year ago

innerdrum · @innerdrum
88 followers · 302 posts · Server mastodon.blaster.com.ar
Matthias · @myell0w
434 followers · 81 posts · Server mindly.social

Another question: how does one respond to standard main menu entries (Commands) like “Select All”?

developer.apple.com/forums/thr

I tried `.onCommand((NSStandardKeyBindingResponding.selectAll)) { .. }`, but that doesn’t get triggered.

#SwiftUI #selector

Last updated 1 year ago

Inautilo · @inautilo
97 followers · 212 posts · Server mastodon.social
Inautilo · @inautilo
97 followers · 212 posts · Server mastodon.social
Inautilo · @inautilo
88 followers · 181 posts · Server mastodon.social


The truth about CSS selector performance · Edge’s DevTools can now measure the impact of CSS selectors on page speed ilo.im/10issq

_____

#development #tools #webdevelopment #webdev #webperformance #webperf #browser #microsoft #edge #devtool #frontend #css #selector

Last updated 2 years ago

Jon Reid · @qcoding
640 followers · 313 posts · Server techhub.social

Update on my battle between swizzling and '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((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.

#SwiftLang #selector

Last updated 2 years ago

pablolarah · @pablolarah
122 followers · 917 posts · Server mastodon.social

★ CSS :has() feature detection with @supports(selector(…)): You want :has(+ *), not :has(*)
by @bramus @bramus@front-end.social

bram.us/2023/01/04/css-has-fea

#css #has #selector #webdev

Last updated 2 years ago

Jangofatt · @Jangofatt
2 followers · 6 posts · Server mastodon.world

Installed the . So much easier now to change between games. Rediscovering some fantastic

#system16 #multi #selector #oldschool #arcade #classics

Last updated 2 years ago

Tsuyoshi Niwa · @pepeimposible
10 followers · 71 posts · Server universeodon.com

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: (checkHappiness), userInfo: userInfo, repeats: false)

}

#selector

Last updated 2 years ago

Tsuyoshi Niwa · @pepeimposible
10 followers · 71 posts · Server universeodon.com

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: (checkHappiness), userInfo: userInfo, repeats: false)

}

#selector

Last updated 2 years ago

innerdrum · @innerdrum
57 followers · 438 posts · Server mastodon.blaster.com.ar

¡Arrancando un stream improvisado de música house!
twitch.tv/dj_innerdrum
#twitch

#dj #musica #housemusic #NoMic #selector #argentina

Last updated 2 years ago

innerdrum · @innerdrum
55 followers · 509 posts · Server mastodon.blaster.com.ar
innerdrum · @innerdrum
55 followers · 509 posts · Server mastodon.blaster.com.ar
The whale · @thewhalecc
284 followers · 1736 posts · Server framapiaf.org

: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... polypane.app/blog/where-is-has by @Polypane@twitter.com

#front #css #selector

Last updated 2 years ago