Crediting Non Deductible IRA contributions to IRA distributions

This tax year (2019) I started distributions from my IRA that I have made Non Deductible contributions to.  When I researched this I found 2 different methods for calculating how to credit the Non Deductible portion of the distribution.

1st: When I take a deduction I use the non deductible portion and subtract it from the total distribution. Once I’ve offset the entire Non Deductible contribution, anything else is taxed as ordinary income. Sort of a first in first out format.
2nd: Take my total Non Deductible contributions and divide it by the end of year balance of the IRA account. I use that percentage on the amount of the yearly distribution. The calculated percentage is Non taxable (the Non Deductible portion). The remainder is taxable as ordinary income (the gains on the account).

Which method is correct?