Problem with that is that if he had said he would resign after a Leave vote, many people would have voted leave just to get rid of him (and if you think this is uncharitable, think of all the people who voted leave as a protest vote against the London elite)