Post

Replies

Boosts

Views

Activity

Reply to Aspiring Developer
I’m kind off in a same situation. I’ve got some basic knowledge with programming like basic, pascal and C. But not really the object oriented languages. I followed the 100 days of swift what was already mentioned. Pretty good first step. SwiftUI is about iOS programming, but I myself am looking for macOS programming stuff. Most of the stuff on internet and books I found are on iOS apps. If anyone had advice here, I really like to hear it.
Dec ’20
Reply to Beginners Question (Expressions are not allowed at the top level)
Thank you for answering. As in the first answer (from @claude31) I uderstand it is not possible to change a value that is inside a class. So does this also mean I need to do all the logic within the ViewController class? From the second answer (from @OOPer) I can see that I can get rid of the "Top level expression not allowed" message. But as soon as you try to call the function, you have the same problem again. So here again that all the logic needs to be done within the ViewController class? Just before I try out some things, is it possible for example to call a function outside de ViewController class, that returns value? That value will then be used inside the ViewCntroller class to change the label. There is no direct way by changing the label. Or is there? I mean, there is no direct way to say "let label="text""?
Dec ’20