Question: how to connect my iphone to my tv with wifi?
Answer: Make sure your iPhone and Apple TV are on the same Wi-Fi network—otherwise they won't see each other.
Open Control Center on your iOS device. ... 
Tap the Screen Mirroring button. ... 
Select your Apple TV from the list that appears.