Пікірлер
@saskiaa9165
@saskiaa9165 7 сағат бұрын
I love ppl like this. Readability and structure is so important. I'm new to SwiftUI, I find it hard to change my way of thinking from C to Viewmodels. It looks a lot like C# to me, something I also found complicated when your mind thinks C. In your example, if you move code to seperate views (either in the same file or another file), is that part of the code considered a View or a ViewModel? PS love your dogs. :-)
@predicked
@predicked 11 сағат бұрын
I got this after run p String(decoding: encoded, as: UTF8.self) on the (lldb) error: <EXPR>:8:18: error: cannot find 'encoded' in scope String(decoding: encoded, as: UTF8.self) Cannot get the details like yours. I also tested run your final project, it got the same result. How to fix this? There's orange hi-light with this message on debug console when the app launch. nw_connection_copy_connected_local_endpoint_block_invoke [C2] Connection has no local endpoint
@elemento_arts
@elemento_arts Күн бұрын
Looks Great Paul. Although we need the Grid version, tables are taking a 2nd seat in >2024. Particularly on how to delete them. Thanks
@MinecraftianPE
@MinecraftianPE Күн бұрын
what i wrote. for i in 1...100{ if i.isMultiple(of: 3) && !i.isMultiple(of: 5){ print("Fizz") } else if i.isMultiple(of: 5) && !i.isMultiple(of: 3){ print("Buzz") } else if i.isMultiple(of: 3) && i.isMultiple(of: 5){ print("FizzBuzz") } else { print(i) } } found afterwards with chat, could've swapped looking for 3 and 5 first, then else if each multiple of 3 then 5 resulting in shorter code.
@RaZeXzZz
@RaZeXzZz Күн бұрын
Could you by chance create a video or post on how to sort sub Models? In this example, if we moved the edit screen to its own and have a sub view that has the sights, how would we be able to sort these sights?
@edgar_roca
@edgar_roca 2 күн бұрын
et albums = ["Appetite for Destruction", "Use your Illusion"] let numberOfAlbums = albums.count var secondCount = Set(albums) print(numberOfAlbums + secondCount.count)
@neilaryaofficial
@neilaryaofficial 2 күн бұрын
Thanks Paul, finally because of you I'm starting to understand swiftUI. Great work.
@JohnDoe-tq5hy
@JohnDoe-tq5hy 2 күн бұрын
1:30 I didn't know how to rename a file in Xcode (there was no rename or refactor option) so I figured out you can do it by holding left click on it
@sergiovinhal5934
@sergiovinhal5934 3 күн бұрын
Thank you so much!
@ConfidentlyRong-jo5yt
@ConfidentlyRong-jo5yt 4 күн бұрын
Legend!
@josecaldev
@josecaldev 4 күн бұрын
Well, he said in ONE line. My immediate thought was Closures. Here my solution: let optFunc = { (array: [Int]?) -> Int in array?.randomElement() ?? Int.random(in: 1...100) }
@fdm225
@fdm225 5 күн бұрын
amazing, as a programmer who is learning swift this is just amazing.
@josecaldev
@josecaldev 6 күн бұрын
Fully understood everything. However, why on the second example we didn't used "using". I modified the first example removing the using and still works. Any reason on why and when use "using"?
@josecaldev
@josecaldev 6 күн бұрын
I think it might be for ease of reading purposes. To show that an external function or closure will be used there (hence the "using" name). That's what I can believe it is. Please let me know if I'm wrong. Close. Or help me fully understand the use of this keyword 🙏🏻
@golfevolved
@golfevolved 6 күн бұрын
With newest version of XCode it crashes in Preview with following error: SwiftData Fatal error: failed to find a currently active container Found the following code on StackOverflow and was only way I could get it to work: #Preview{ do { let config = ModelConfiguration(isStoredInMemoryOnly: true) let container = try ModelContainer(for: Destination.self, configurations: config) return ContentView() .modelContainer(container) } catch { return Text("\(error.localizedDescription)") } } Why????
@JohnDoe-tq5hy
@JohnDoe-tq5hy 7 күн бұрын
Hi Paul, not sure if you'd want to fix or not but the end of vid contents (suggested video, the channel icon) pop up around the 4:54 mark even though the video hasn't ended yet. Just as a heads up. Love the content!
@Hgvpuncher
@Hgvpuncher 8 күн бұрын
thank you chief
@elemento_arts
@elemento_arts 8 күн бұрын
This series is pure Gold. Thanks Paul.
@elemento_arts
@elemento_arts 8 күн бұрын
Omg.. this is magic. Migration after a adding a single new property in Core Data was an absolute horror nightmare. God bless SwiftData
@elemento_arts
@elemento_arts 8 күн бұрын
Hi Paul. Amazing tutorials! Got 2 questions related to SwiftData: 1 - Why when I create a custom type (struct) for one of my class properties, I get the same error? "No exact matches in call to instance method 'setValue' Ex. @Model class TennisLesson { var members: [Member] = [] init(members: [Member]) { self.members = members } } struct Member: Codable { var name: String var lastName: String func addMember(_: Member) { } func removeMember(_: Member) { } } ** I'm thinking I should probably make the "Member" struct into a class, and make that class a many to many relationship with "TennisLesson". As well as adding the Member class into the container with TennisLesson. 2- How do you save Images? Do you use Image, UIimage or Data type? Thanks
@pointer333
@pointer333 8 күн бұрын
Dang I got excited that this would show me how to store actual structs/objects with subobjects and non-primitive types (Set, dict, etc...). But this suffers from the same limitations as JSON, it seems. I want to see the equivalent of Python's Pickle!
@Contreras04
@Contreras04 8 күн бұрын
Man I wouldn't be an iOS developer if it wasn't for you. Thanks for all this content ❤
@gizaLook
@gizaLook 9 күн бұрын
Nice tutorial
@SFAutor
@SFAutor 9 күн бұрын
Thank you much for your video. I have a question that has been bothering me for a while as a beginner, but I can't find an answer to it. I would like to try my hand at a Mac app that can manage large volumes of text (manuscripts). As an author, this would specifically be chapters of my novels. My initial aim is to write, edit and save larger sections of text in a two-part window, in which an overview or directory structure of all texts is displayed in the left-hand area, and if you click on the respective selection, a text editor appears in the right-hand window in which you can edit the text. Later I would like to be able to code the texts as markup, but at first I don't understand how best to approach such a project. In XCode there is a "Mac App" or a "Document App" as a project. Which of the two forms should I choose for such a project?
@47goodfoot
@47goodfoot 9 күн бұрын
I really appreciate this quick and informative instructional video! I just got several of your books and am really looking forward to working through them, while pausing periodically to make my own apps, of course. 😃
@rafaelproenca7329
@rafaelproenca7329 9 күн бұрын
This guy is so great! Extremely smart and so good at teaching
@Ferd414
@Ferd414 9 күн бұрын
Hey, Paul - If you're gonna update, PLEASE, for the sake of anyone like me, who has no choice but to support older hardware (and therefore, older software, tools and coding practices) put the update *ALONGSIDE* the original, instead of junking and replacing the old version! That doesn't just apply to this vid - I'm also speaking of your material on the HWS website, which, granted, is some serious good stuff, but for those of us who don't or can't work exclusively on hardware (and therefore, software and tools) that's bleeding-edge-just-released-yesterday, losing the "old" tutorials and docs because they've been updated to this week's "latest and greatest" is a serious kick in the guts.
@twostraws
@twostraws 9 күн бұрын
All the old iOS 15 and even iOS 13 videos remain on KZbin, SwiftUI by Example shows both new code and old code wherever possible, and folks who buy Hacking with iOS get both the new book and the old book as part of their purchase - it’s hardly what I’d call “junking and replacing.”
@Ferd414
@Ferd414 9 күн бұрын
@@twostraws You seem to have taken that as some sort of personal jab - That was NOT the intention. More of an observation that everybody and his dog who puts out tutorials, examples, and docs seems to be obsessed with punching out a new version every time Apple hints at a new software version number, and in the process, dumps us "not the blood dripping off the bleeding edge" folks like a hot rock.
@enfocateyestudia1322
@enfocateyestudia1322 10 күн бұрын
Amazing Job brother and amazing family he he i see you from Paraguay thanks❤
@sergiovinhal5934
@sergiovinhal5934 11 күн бұрын
Great ! Thank you sir !
@user-lp6qg8kx4v
@user-lp6qg8kx4v 11 күн бұрын
You deserve more views, anywaysss thanks for this
@spradohak
@spradohak 11 күн бұрын
class Animal { let legs: Int init(legs: Int) { self.legs = legs } } class Dog: Animal { init() { super.init(legs: 4) } func speak() { print("Woof") } } class Cat: Animal { var isTame: Bool init(isTame: Bool) { self.isTame = isTame super.init(legs: 4) } func speak() { print("Meaw") } } class Persian: Cat { init() { super.init(isTame: true) } override func speak() { print("Meaaaaaaaaw 😼") } } class Lion: Cat { init() { super.init(isTame: false) } override func speak() { print("ROOOOAAAAAAAR 🦁") } } class Corgi: Dog { override func speak() { print("Woof woof 🐕") } } class Poodle: Dog { override func speak() { print("Woof woof 🐩") } } let poodle = Poodle() let corgi = Corgi() let dogo = Dog() let cat = Cat(isTame: true) let persi = Persian() let lowe = Lion() poodle.speak() corgi.speak() dogo.speak() cat.speak() persi.speak() lowe.speak()
@AcknowledgeMe-cq5io
@AcknowledgeMe-cq5io 12 күн бұрын
Feak
@earu723
@earu723 12 күн бұрын
can i persist swift. data with a firebase backend?
@ConfidentlyRong-jo5yt
@ConfidentlyRong-jo5yt 13 күн бұрын
Thanks for the videos! I added a highScore that could be saved using SwiftData. I learned a lot from this project! Hope you have a good day Mr. Hudson, cheers!
@tommyborgenfalkskott
@tommyborgenfalkskott 14 күн бұрын
"Organize sock drawer" hahah what the hell... :D
@WenzelStone
@WenzelStone 15 күн бұрын
Oh God, this is mind-blowing!
@danielcrompton7818
@danielcrompton7818 15 күн бұрын
So is my assumption right that we can either add animation modifier to views or use withAnimation
@vinothkumarramakrishan8246
@vinothkumarramakrishan8246 15 күн бұрын
hi i want to find a real face or (face in picture or video) is there any SDK avail for this in swift
@jamesvanderbilt201
@jamesvanderbilt201 15 күн бұрын
I thought this was going to be about Taylor Swift…but now I’m a programmer 🧑‍💻
@mareksienczak3135
@mareksienczak3135 15 күн бұрын
Unfortunately if you try typing around 100 lines the editor gets spasm and jumps up and down while you're typing.
@danielcrompton7818
@danielcrompton7818 15 күн бұрын
So what about withAnimation {}
@saifdj
@saifdj 15 күн бұрын
Is there anyway to download the demo project? else tip: you should start providing the links to demo projects 😄
@denaktepe
@denaktepe 17 күн бұрын
After learning SwiftUI, UIKit is a little bit harder. I wish all the companies will convert their UIKit projects to a SwiftUI project.
@danielcrompton7818
@danielcrompton7818 17 күн бұрын
So what is @Environment vs @EnvironmentObject
@adam62385
@adam62385 17 күн бұрын
What's the updated code to get the playground running in Xcode 15? Anyone? I mean.... I guess I could give chatGPT a try & see if it can convert the code...
@decky1990
@decky1990 18 күн бұрын
I'll have to try it, but does inflection work for 0 and negative values?
@ags1373
@ags1373 18 күн бұрын
bro this sheeesh crazy it worked like a buttercup with chicken holybadoly nice ty
@bigknightentertainment2746
@bigknightentertainment2746 18 күн бұрын
I would like to practice more with different API’s, whats web url (website) for Apples API?
@Natena
@Natena 19 күн бұрын
Brilliant Explanation <3
@josephalbanese4859
@josephalbanese4859 21 күн бұрын
Hey Paul - I'm curious, for the custom .stacked extension, is there a reason you decided to give cards less offset the closer they are to the end of the index instead of the opposite (e.g. card 0 has 0 offset)? I ask as I was working through understanding the extensions logic and felt it was a little confusing at first glance. (I'm on day 88 and trying to improve with custom modifiers! 😅) I modified it in my own project, so that I just take the position and offset it but 10. Thanks for your help! This class has been incredible. func stacked(at position: Int) -> some View { let offset = Double(position) return self.offset(y: offset * 10) } }