We have twin girls aged 7 now, so had double terrible twos! To be honest, one was much worse than the other, but they both had their moments (and still do from time to time)!
You definitely need to avoid slapping your kids. At two years old, you - as an adult - should not need to resort to this; all you are doing is expressing your own frustrations, not teaching the child anything at all (except, possibly, hitting is the answer if you don't get your way).
I also disagree that you should never let your kid win. You need to show the child that the world can be fair even when you're two years old. I'm not saying that you give in because you can't be bothered to fight any more (quite the opposite, if you're right, you just have to tough it out), but you should give in if you realise you are in the wrong, and you can explain to the child why you have made the decision. So just arguing the point until you're screaming at the kid, without stepping back and realising that he/she might have a point from time-to-time, is counter-productive. It's very hard (my biggest challenge as a parent, if I think about it) as there are days when you yourself just pick an argument in everything your kids do, but you've got to really choose your fights.
For us, it came down to a couple of things: setting very clear boundaries with a punishment that we were always willing to carry out (even if we didn't want to), and teaching our girls to empathise. This take s a LOT of effort, but is absolutely worth it in the end. You need to start by making it absolutely clear in ANY situation what you expect of him/her, and get them to agree to this ("I'd love to take you to the park, but you can't run away when we go to the park because Daddy will be worried/you might get hurt/there's a main road, so if you can't do that, we will need to come home" and get them to agree that they understand this....then if they run away, bring them back, remind them of the deal that they can't run away and if they decide to run away again, you will go home; then if they do, carry out your threat... whatever you do, don't just keep repeating the threat and doing nothing!). If they throw a tantrum, ignore it even if it goes on for ages, it's only to get your attention, and when they are calm (however long it takes) explain clearly why their behaviour is wrong and how it made you feel. Also, ask them why they behaved like they did, because you may be able to find a way to compromise next time, and the kid will realise that tantrums don't work, but calm negotiation sometimes does.
Also, learn to spot the warning signs, and try to divert attention from the trigger, by getting them to engage with you in something else positive before it even gets to a discussion on the possible issue (we still do this loads, even with our 7-year-olds)
Even so, there's no way to avoid tantrums, so make the best of it you can. Two-year-olds can't express a lot of what they think and feel, so it's a very difficult time for them, so just keep on doing everything you can to make it easier for them.