tantrums

It seems everywhere I take my two and a half year old it ends up being a nightmare bc she throws a tantrum. For example today was a fair near our home with rides etc. She was in the bounce house for a long time and was enjoying herself, so we kept feeding the guy tickets. I was giving her warnings before it was time to leave and she came out of the bounce house ok, but then it started. Any tips on how to avoid the tantrums? It's embarrassing in public to have your kid screaming, crying and hitting you while every one is watching. I tried to distract her with another ride option. That made a second tantrum happen because she wanted to buckle herself in. I was letting her until this one mother stated to her son for him to get off the ride because the little girl wasn't cooperating. So I got frustrated and took her off. She is very strong-willed and likes to do things herself. I usually let her do it unless it is dangerous. I'm just becoming to realize that I don't want to take her places anymore bc of the risk of a tantrum. Any tips or help??