IPhone 4 temprature warning?

So I work at a pool and yes my phone was in the sun for maybe like five minutes. When I picke it up it had the temprature warning. Then went away. I have read some places that the phones do that without being even hot. My question is should my phone be okay?

Yes it's okay just try not to do that again lol