Both.
The way EVing works is, vitamins can only be used during the first 100 EVs in a stat and give 10 EVs each, wings can be used at any time, but only yield 1 EV each.
Battling with Power Items works the entire time, and adds 4 EVs in the respective stat, before Pokerus.