This is my first SwiftUI tutorial and first tutorial in over a decade, I’m looking for some feedback before I make it public.
Cool !
I’ll give this a thorough run through tomorrow
Thank you Norman. I appreciate it.
I’ll take a look as well, but may not be until Tue
Looks like a detailed and very well-written piece! Unfortunately I don’t have the time now to read it in detail and do a code-along but will do. Thanks @samRowlands for this excellent contribution!
Thank you Dave, I appreciate you taking the time.
Thank you Torsten, I hope it lives up to your expectation
well structured, even optically. Clear steps, easy to follow. With publishing date and program versions (very good many are missing this!), ready to publish!
Some hints:
-
When showing sourcecode, please do not make this with images. When somebody is reading, he/she might use your tutorial alongside XCode, expecting to copy & paste. And make it universal please. In the 4th chapter for example you are using prper text for your code, switching then back again to images.
-
The screenshots, esp those showing whole screen, might be too small. Would it not be better to make them larger or at least clickable to see them in preview?
-
When using APIs, commands or functions, use referencing links to documentation.
-
Use a Git-Repo, then your tutorial can grow and adopt over time. Even if you are alone the one, who will maintain this. Static websites (even in some kind of cms) will become outdated in some years. I recommend codeberg.org as alternative to Microsoft GitHub.
so cool! Thank You!
I will follow that tutorial during the next few days.
Using macOS 14.7.4 (Sonoma) with Xcode 16.2
-
SOME previews do not work quite right but everything seems to work more or less as intended
-
images could be larger as they are quite small and makes following along tougher
-
some text, in dark mode, is white on white
in step 3 does LocalizedStringKey only work on newer macOS version to render the markdown ? I’m not seeing it do that here BUT thats OK if its just not a thing in this old version of macOS
Got as far as starting step 5 today
I’ll try to go through the tutorial as soon as my migraine eases off a bit. Thanks for posting it. I’ve been doing only iPad Swift/SwiftUI programming so far, so it’s helpful to see a macOS SwiftUI example.
Thank you Tomas.
I am only using images to show what the completed changes should look like, but I can type these out as source code, it’ll just take a while.
I hear you and Norman made the same comment, so I’ll look into redoing them at a larger size.
That can take a long time, especially for the longer blocks of code. I’ll have a think how to do this efficiently.
I haven’t thought anything about the future of this tutorial, nor am I set-up for using git or any other code sharing service. It’s something I’ll consider for the future.
You’re welcome, I hope that it helps.
I have found that some previews don’t look 100% as they do when the application actually runs.
Noted, I’ll look at redoing the screen shots (I didn’t keep the original images) at a larger size.
Now that’s really bad, I’ll fix the CSS.
hmm… I developed this on Ventura with Xcode 15, so the LocalizedStringKey should work on ~10.19~ I mean macOS 14. I did a quick test with macOS Sequoia and it worked there. I tried to see if I could find out if it is a bug or not in macOS 14, but I couldn’t. Maybe you could post your code and I’ll see if I can spot anything, Xcode should warn you if something isn’t right.
You’re not far from completing it
I hope that your migraine eases, I can sympathize what its like. I did think about including a section on adapting the code so it could be run on an iPad, but I’ve not tried it yet and don’t have any working iPads left.
It would be nice to consider this, 'cause else all your effort and hard work would be for the moment and not interesting anymore in, lets say, 3 years. May I ask for whom you are making this tutorial?
Yes, that’s hard work. It brings your tutorial closer to the common scientific standard. You do not need to link everything. Markdown offers footnotes. In my blogs I am mainly using footnotes rather direct links.
Here’s an example: Enroute in practice
I’ve started updating, but ran out of time, so I only got as far as chapter 4.
- Larger screenshots.
- Dark mode support in the code.
- Replaced screenshots of completed code with actual code.
I’m making it because I wished for a tutorial like it (especially covering more than just placing an AppKit control into a SwiftUI view), at the same time, it’s meant for people who use other tools and are interested in developing for the Mac (which includes a number of Xojo’s customers). In the case of Xojo developers I wanted to demonstrate how easy it is to get standard macOS functionality that Xojo pretends doesn’t exist, such as ScrollViews, Customizable Toolbars, icons in menus, automatic menus, window restoration, window tabbing, document versions.
There is more functionality that I could demonstrate, but it would require a different kind of application that the one I show how to build.
Use LiveText…
I’ve about done with the replacing the code overview screenshots with actual code that be copied and pasted.
@npalardy I don’t know why I didn’t think of this yesterday, but if you’re still having trouble with the LocalizedStringKey, try downloading the completed project from the tutorial page and running that. If it still doesn’t display the text then I think it’s a bug and potentially with that version of the macOS.
This is some **bold** text, while this is *italic* and this is ~strikethrough~
No idea what changed but it is working
Didnt even need to download the completed example
Onwards !
Oh and thanks for the revised things
Makes it a lot more readable
All I did was skim. Was it supposed to make Swift look easy? I did not get that feeling.
That’s good, thanks for sticking with the tutorial, I hope that you’re enjoying it.
I’m pleased to hear it. Thanks for taking your time to try this tutorial and to share your feedback with me, I really appreciate it.
Maybe I ramp it up too quickly? In the first 3 chapters you get a lot for not much effort, but I then cover some more advanced topics which can take a bit more code and understanding.
Gotcha, so there’s a lot I already missed.
If you’ve got a spare few minutes, I’d suggest trying the first 3 chapters.