I think I have most of the random rectangle assignment figured out, but I haven’t tested my code yet because I have class shortly.
So, there is a set of methods associated with detecting that the iPhone shakes. It was spoken about in the book we are using, but it did not explicitly state that you can call methods when the device shakes. The method I used was “(void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event”.
My last few problems I am having is wondering if this will create a rectangle every time the device shakes or if it will only create one that will move and change when the device shakes. The other one that I have is there is a drawRect method that draws a rectangle but it requires you to pass a rectangle to it before you execute it.
There are a lot of void methods that require you to pass an object to the method and it does something. Maybe I am just not thinking about this correctly, but that seems weird to me. I feel like I should be returning the object rather than passing the object.
I will talk to Eric after class about whether I did this correctly or not. If I haven’t I will come back and say what I did incorrectly and what I needed to fix.
Now on to focusing on what is happening now rather than what already happened…