The spark sparks before TDC and the mixture starts to burn, but it's set so that when the main "whomf" comes when the whole mixture ignites and "explodes", the piston has just gone over TDC, so the expansion sends the piston winging down the bore.
So in a way, you're both right, because the ignition process takes place as the piston comes close to, then goes over TDC.
This is how I've always understood it, may be wrong though...