I have a two year 5 month old. He's done pinching, hitting, slapping and pushing when he gets angry. I stopped him by disciplining him. I slapped his hand. Not swat, slap. If you do it hard enough that it turns red, then you know they feel it. And he stops doing it after the 2nd or third time. If you punish them for doing wrong, they will stop doing wrong. You can pinch them back (my wife said this worked when he used to bite her when she stayed home with him, she finally bit him back once and he never did it again), slap their hand, whatever. But you have to let them know you MEAN it. A little bit of discomfort doesn't tell them you mean it.
If you don't have the fortitude to swat them hard enough to do anything, then they're going to keep on doing it. I hope the talking to them works, but it never worked for my son, it didn't work for my sister's two kids, or my brothers two kids. Punishment and discipline do work. And all their kids, and my son, are angels for babysitters and family and when we go out, etc, because they know we MEAN it when we tell them not to do something.