It appears that once I opened my project the long way, File-Open that was it. It took care of everything. Seems like a waste of time.
Post
Replies
Boosts
Views
Activity
Isn't it a problem of myView or mainView? I guess you are doing wrong setup for them.
I knew I should have cut that out, that's just some global variables I have to clean up. I have no problem, what I am doing works. I was just hoping there might be a method that handles all the logic for me.
Actually someone gave me an easier answer on StackOverflow. This is a quote from the link below
There is a method called reversed() which you could use.
Below I have given your action a name of "youraction"
let youraction = SKAction.follow(iconPath0, asOffset: false, orientToPath: false, duration: 1)
let reverseaction = SKAction.reversed(youraction)
yourspritenode.run(reverseaction)
Alternatively, you can just use reversed after the action name to run it in reverse:
yourspritenode.run(youraction.reversed())
https://stackoverflow.com/questions/66354936/how-can-i-have-an-skspritenode-follow-the-same-path-back-and-forth/66357189#66357189
You were right, but only because your answer made me realize that I was searching under
SWIFTACTIVECOMPILATION_CONDITIONS
rather than
SWIFT_ACTIVE_COMPILATION_CONDITIONS
But I thank you much the same.
And then added LaunchScreen.storyboard with File > New > File... > User Interface/Launch Screen. In the end, deleting the original LaunchScreen, and creating a new one solved the problem. It now shows up both the simulator and the physical iPhone. Would still love to know why tho.
Can you clarify the settings or the environment to reproduce the issue?
Sort of macOS version or simulator versions or any such things may be affecting.
I'll do you on better.... feel free to download the zip file
98 . 7 . 37 . 118
Am using Xcode 12.4
on a Mac osBigSur
I really touched nothing. Made at least 10 new projects, and same thing occurred. I did it just now...touched nothing but changing the color of the storyboard and it works.
I've seen a few postings of the same problem. <shrug>
Do I need to repeat? When you choose Storyboard as Interface` when creating a new project, you can find AppDelegate.swift or ViewController.swift.
And then you can remove what you think is not needed for you. Well then, and please remember that when you first saw my posts, I had just started Xcode and Swift (mid June 2020?). If I go without SwiftUI, do I lose anything? I was watching a tutorial that showed the changes in how to create a text object, and the syntax even seemed more simplified (i.e. changing textcolor).
But will I lose any new functionality (enduser wise) by not using SwiftUI?
And yes, I have dedicated all day to watching WWDC presentations, and SwiftUI tutorials. I just fear in my time away from Xcode, I missed out on something I shouldn't have.
Thanks
Hey OOper,
You've helped me a lot before. I don't want to use storyboards, but things have changed in 12.4.
For instance there's no more AppDelegate.swift file.
I would start at class ViewController: UIViewController before. Now there's struct ContentView: View which I don't recall when in started learning in late 2020.
Has something drastically changed? Is it that I never used SwiftUI?
I am still working on my game, which I started in Xcode 11.x, so no worries. But I wanted to start a new, non-gaming app, and I guess I need a reference point where to start at so I know where to go.
I hope this makes sense.
Yes I finally found:
for touchNode in self.nodes(at:post){
... }
I also wanted to explain what looks like laziness on my part. Am not lazy, and am not dyslexic. But I do have some issue with reading, where stuff just gets skipped...especially online.
Please ignore this question. Turns out my texture file was padded on the top and bottom with transparent areas. Was a bone head move.
They need to put in an option to delete a question.
I got it to work, found the popup window, and have experimented multiple DEFINES
Please let me know I have it right if you can
www. warptv.com/links/screen1.png
This is what I want:
#if MYSCENE print ("\(GameScene Complete)")#endif It does work with #DEBUG, like you said it's built in
adding MYSCENES=1 to : GCCPREPROCESSORDEFINITIONS
does not work
adding MYSCENES to SWIFTACTIVECOMPILATION_CONDITIONS
does work, however I can only add one. when I add MYSCENES, it works. But if try to add another, it over writes the MYSCENES
Preprocessor defines are specified in build settings under "Other C flags". You would add something like -DMYSCENE. Huh, there it doesn't work.
I found Other C Flags, selected DEBUG
clicked to ADD CONDITIONAL SETTING
and it didn't work from there.
To be safe I tried it with and without the -D
I even used cut and paste so there would be no typo errors
I know Xcode has been under quite a few changes, am using version 12.1 (in was that makes a difference)
In Swift, they are compilation conditions, and defined by SWIFTACTIVECOMPILATIONCONDITIONS. Hope you don't mind, but while it works, I still want to make sure I put it where I should.
Project -> Build Settings -> All > (search) "Active Compilation"
select Active Compilation Conditions
click +
select Add Conditional Setting
under Debug there is now this additional line :
Any Architecture | Any SDK ______________ MYSCENE_______________ MYSCENE
Again, does work, but it wouldn't be my first time get the result I want but doing it incorrectly
p.s. I can only add one. I try to add a second one, and it overwrites the first. Can't see how to insert it.