The recommended method to paint wheels is to remove it from the tires entirely. However, on the occasion that it is not possible or you are in a hurry, there are still ways to paint the wheels.
By using a tire gel, you can prevent the stickiness between the tire and the wheel. A piece of cardboard is also proved to be useful in this situation. Once you have those two compartments separated, you can start applying paint on the wheels without fear of tires catching excess paint.