I must be honest. After almost a month of learning swift, I am still baffled everyday when I try to do the most simple things. Many of the written tutorials don't address the more simple things. And Apple's developer Library tells me all of the functions and objects but it gives so little I don't know how to implement them. If anyone knows any good resources for swift implementations let me know.
So, what i'm trying to do today is animate a rectangle. I have a simple UI.animateWithDuration that doubles the size of the rectangle over 1 second.
I want this animation to run whenever the user touches inside the rectangle. Not "tap" or long press. but ANY time they touch. (for example they are touching the ipad screen and moving their finger along and it enters the rectangles bounds. (is it bounds or frame?).
so what is the simple code for triggering this animation when the user touches their? i know it has something to do with touchesBegan(NSSEt) .. whatever... and CGRect contains point.
I get the basic concepts but always fail to implement it because of the many many various syntactical errors that await me on every line.
hope to get some good answers and good ideas on how to learn swift quicker
So, what i'm trying to do today is animate a rectangle. I have a simple UI.animateWithDuration that doubles the size of the rectangle over 1 second.
I want this animation to run whenever the user touches inside the rectangle. Not "tap" or long press. but ANY time they touch. (for example they are touching the ipad screen and moving their finger along and it enters the rectangles bounds. (is it bounds or frame?).
so what is the simple code for triggering this animation when the user touches their? i know it has something to do with touchesBegan(NSSEt) .. whatever... and CGRect contains point.
I get the basic concepts but always fail to implement it because of the many many various syntactical errors that await me on every line.
hope to get some good answers and good ideas on how to learn swift quicker