Did my Iphone just get hacked?

Remember hind sight is 20/20… Anyway. I met my friend over at a friend of his that I didn't know. We all three were there hanging out, when my friend needed to step outside. The person in question eventually notices my Iphone 4 and asks if I wouldnt mind letting him use my iphone to bring up all his lost data from an ipod he lost sometime, but somehow the data was retreivable. After assurming me no harm would be done to my phone I agreed. I then connected my phone to his Wi-Fi, (what he did with the phone EXACTLY from here is speculation cause I can't be sure) he then supposedly backed it up on I cloud (or somewhere because I know he backed it up because it was restored from a backup) "attempted to log into his apple account to gain access to his info but was "unable" for some reason I didn't get, and then gave me back my phone to re login to apple and start the icloud restore. Now after all this had taken place I didn't think much of it. A few hours later, with a drive home to think about it, I start getting worried. I may not know him well, but what i've been told is that he is VERY savvy with computers in all ways. Now I'm home waiting for my restore to finish freaking out about whether this guy just somehow downloaded my entire phones data to his laptop… Is it possible? And if so is there anyway I can see evidence of it on my phone, or defend against it?

It is possible if some monitoring program is installed on your phone when he used it. You can have your phone restored or system upgraded. In this way, the spyware will be deleted.
http://ikeymonitor.com/