Craig Harrison

1.5K posts

Craig Harrison banner
Craig Harrison

Craig Harrison

@CraigHarrison11

Senior Software Engineer · iOS · Web

Katılım Kasım 2011
337 Takip Edilen283 Takipçiler
Craig Harrison
Craig Harrison@CraigHarrison11·
@natmiletic Instead of using number literals in your code, you should extract those into variables.
English
1
0
0
25
Nat Miletic
Nat Miletic@natmiletic·
Does anyone know if there is a better way to do this?
Nat Miletic tweet media
English
2.5K
329
8.5K
1.7M
Karin Prater
Karin Prater@swiftyplace·
The new ScrollView feature scrollPosition is super useful. Just created a simple color picker. I also used visualEffect for same animations:
English
5
12
197
19.1K
Daniel Saidi
Daniel Saidi@danielsaidi·
@moosethedev @_JohnGibson_ I tried it and it works 🙌 ...however, applying a fixed size messes with accessibility, so I've decided to just use plain images instead of having the circular shape. But thank you!
English
1
0
0
108
Daniel Saidi
Daniel Saidi@danielsaidi·
Anyone who knows if there's a way in #SwiftUI to make all SF Symbols in a group use the same size, besides applying a scale to fit and a fixed size to the container?
Daniel Saidi tweet media
English
8
0
12
9.1K
David Steppenbeck
David Steppenbeck@dsteppenbeck·
I'm having a go at updating view models to use the new @Observable macro in #iOS17 ... updating some were trivial but I'm running into a little resistance with others. Take, for example, this tip jar store model, which was previously defined like this at the @main App level: @StateObject private var store = TipJarStore() MainView(...).environmentObject(store) And, after updating, is now like this: @State private var store = TipJarStore() MainView(...).environment(store) and all previous @Published properties inside the model are now just declared as regular vars. The problem is that what was the @Published properties in the tip jar view formed bindings to alerts and is now giving compile time errors. I realize that the solution here is to apply the new @Bindable property wrapper, like this in the view: @Bindable var model: TipJarStore But then I lose the advantage of injecting the model into the environment and accessing it only in the tip jar view. If I change it away from the environment, it means I have to pass it through ~10 intermediate views, none of which use it, which is not great. Am I missing anything here – is there a way to make bindings work whilst keeping it in the environment?
David Steppenbeck tweet mediaDavid Steppenbeck tweet media
English
9
1
13
10.6K
Enid
Enid@ios_dev_alb·
Tell me you use Core Data without telling me you use Core Data 😄
English
15
0
9
6.4K
Craig Harrison
Craig Harrison@CraigHarrison11·
I know you have more important things to do, like beating the shit out of Zuckerberg, but I really think this would cool
English
1
0
1
172
Craig Harrison
Craig Harrison@CraigHarrison11·
Hey @elonmusk, it’s frustrating when you accidentally swipe away from a video deep in the scroll and can’t find it again. Could we get a feature that allows us to shake our device and return to the last viewed video?
English
2
0
1
309
Craig Harrison
Craig Harrison@CraigHarrison11·
@tundsdev Has anyone tried constructing a FetchDescriptor from SwiftUI state variables yet?
English
1
0
0
94
tundsdev
tundsdev@tundsdev·
Ok, this syntax for querying items using FetchDescriptor & Macros in SwiftData is just *Mwah* 💕 Easily my new favourite update in #WWDC23
tundsdev tweet media
English
4
2
34
20.2K
Craig Harrison
Craig Harrison@CraigHarrison11·
@twostraws I just want to be able to easily persist enum values in my data model.
English
0
0
2
489
Paul Hudson
Paul Hudson@twostraws·
Ready to try SwiftData? It's just a picker away 🙌
Paul Hudson tweet media
English
25
62
857
75.5K
Craig Harrison
Craig Harrison@CraigHarrison11·
I just now noticed the "E" is missing from the grade scale. I... I graduated college... I'm almost 30
English
0
0
1
191
Steve Schoger
Steve Schoger@steveschoger·
Should designers name their layers?
English
53
3
26
66.5K
𝙻𝚊𝚞𝚛𝚒𝚎 𝙴𝚍𝚠𝚊𝚛𝚍𝚜
Do you get the ick when you hear certain words? The one I’ve realised most recently that is completely hideous to me is ‘pernickety’ *shudders* What’s your ick word(s)? If you can handle typing it out without doing a sick all over yourself, that is.
English
28
0
18
7.1K
The Post Millennial
The Post Millennial@TPostMillennial·
Bizarre scenes out of Paris. December 24, 2022.
English
224
249
798
130.4K
Craig Harrison
Craig Harrison@CraigHarrison11·
What does it mean when your fortune cookie is empty?
English
0
0
2
0
Craig Harrison retweetledi
Daniel Anderson
Daniel Anderson@juanderson01·
Why is nobody talking about this feature?
Daniel Anderson tweet media
English
29
85
1.4K
0
Iconic
Iconic@theiconicapp·
🌍 We’re going to test a new Twitter feature. We will add the first 150 people who reply to this tweet to a ‘Twitter Circle’. Those 150 will be the first to see what icons we’re dropping every Thursday, plus more. ❋ Reply ‘I want in!’ and we’ll add you.
English
75
1
14
0