I've had a few guinea pigs that LOVE swimming. Years ago, we had a ditch at the bottom of the garden that was watery. Not the best place to swim, I know, but we had one girl that if she escaped from her run would go right down there, hop in, and swim for a bit until she was fed up and she'd come back. Obviously the first time we saw her do that I was worried sick, the second I missed her escape attempt and after that I just gave her a large tub of water (one of those shallow tubs, about 10 cm tall) with a ramp and just enough water to swim in. She loved it. She'd swim round until she was tired, hop out and bask in the sun for a bit (never the shady part, weird pig) and back she went again!
I don't really have any pigs that hate baths as such, and in summer if it is particularly hot, I'll put them in water to cool down and leave them out in the run to dry off naturally. Doing that I have had a few that like to paddle for a bit first, then hop out and in the run they go. That said, the vast majority of my pigs are new this year, so I don't know what they're like. They'll just get water to cool down I think, paddle rather than swim!
It's down to the individual pig. Piggies can swim and whilst piggies today are domesticated, they still have natural instincts, of which swimming is one. Some like it, some don't. If you have a pig that enjoys bathtime and paddles, I see no harm in supervised 'swimming lessons' in a shallow paddling pool or something. That said, you really do need to know each individual pig to see whether they actually like it or they're doing it because they feel they have to.