Einstein dice quote question

I have always heard that Albert Einstein’s famous quote, God does not play at dice was in answer to Werner Heisenberg’s Uncertainty Principle. Or was it directed at Max Planck?

Trying to fashion some Einstein trivia questions, here is what I am trying to verify:
Einstein’s famous quote “God does not play at dice.” was supposed to be directed at this principle?
Heisenberg’s Uncertainty Principle

I don’t have the time to do justice, but can only cite the earliest version of the quote–a letter from Einstein to Max Born, 4 Dec. 1926.