I did this on mine yesterday, the yellow wire which is the memory 12v goes to the 12v wire in the car stereo harness that attached to the back of the old stereo, the red wire goes stright to as switched 12v source, I fed mine into the fuse box. I made myself a fuse tap by grinding a small amount of plastic off the end of a 10A fuse and solering the red wire to it, followed by wrapping it in electrical tape, this fuse can then go into the fusebox in a spare location which has a switched 12v, which you can find with a multimeter
my head unit now switches on and off with the ignition, unfortunantly I am having problems getting the radio to work on mine.