The best way to deal with temper tantrums is to avoid them in the first place, whenever possible. Make sure your child isn't acting up simply because she's not getting enough attention. Acknowledge their emotions. If off-limits objects are out of sight and out of reach, struggles are less likely to develop over them. Obviously, this isn't always possible, especially outside of the home where the environment cannot be controlled.
Distraction is another option.
Take advantage of the child's short attention span by offering a replacement for the coveted object or beginning a new activity to replace the frustrating or forbidden one. Or simply change the environment. Take the child outside or inside, or move to a different room. When your child wants something, really consider the request. Maybe it isn't.