If it hurts when you pee after swimming, don't worry! I've gone through it too and it actually on burns the first time! You don't (most likely) have a uti. Just a short post for all you worriers!
I am a grown man and it happens every time after I swim in a chlorinated swimming pool. If I swim all day at the beach no problem, if I swim all day in a river or lake no problem, but there must be something in the chlorinated water that causes a painful sensation the first time I pee after getting out. I'm pretty sure it's just a tiny bit of chlorine water making its way part way inside causing some kind of irritated reaction. Picture it the same way when you're swimming in a chlorinated pool with your eyes opened underwater for a long time. Your eyes become hypersensitive and highly irritated from that chlorine exposure. For a guy having this problem it could be something as simple as putting a small rubber cap over the tip to prevent water from entering, but I don't have any suggestions for a female. I hope this helps.