Primarily,
you have two main options: use imageView with GIF or using video for background using AVPlayer or MPMoviePlayerController . You can find many examples for both ways, here are a few:
Answering your questions:
Which of them will consume less battery power
The video is usually used: as noted by the user, the vikingosegundo video is usually optimized, and their codecs deal with GPUs; GIF mapping should be the only "CPU-job" because it just shows a frame loop. Thus, energy comparison occurs between a simple frame cycle (GIF) and a more complex frame cycle, which can be accelerated in many ways (video). However, in my experience a small GIF gives good performance.
Can i use it on iPhone or iPad
In both cases, you must be careful about the aspect ratio and auto-detection restrictions.
Executing this method
Great in both cases, but you have to be careful about the size of your GIF or video: the larger your file (GIF or video), the performance should be worse. For a video more precisely, a higher quality worse should be performance, while the duration of the video should not affect.
source share