1. Hold the ball without throwing it until the circle is the size you want. Depending on the boss, I'll go for either a small great or a medium excellent. To avoid accidentally "dropping" the ball, I slide my finger off the bottom of the screen (so I don't throw it forward).
2. Wait for the boss to attack. Not jump, not dodge, it has to attack.
3. Near the end of the attack animation, curve the ball and throw it as normal. You will have to throw it while the boss is still attacking. However, if you time it right, the ball will land right as the boss resets to it's resting position.
4. If the boss breaks out, you don't have to reset the circle (step 1). Just wait for the next attack and throw.
A couple notes:
- this doesn't work for lugia (or at least I can't make it work)
- you can practice on any wild Pokemon
- with this method, I almost never hit a boss while it's attacking