Depends on how much attention anyone paid to the various campaigns. A recent poll suggested, among other things, that the relative stance of the "big players" such as BoJo et al, had actually relatively little impact (although that said, given how close the vote was, even relatively small impacts could have made a difference) -- I suspect that many of the people who thought Cameron was treating voters like kids and voted Leave accordingly probably would have done so anyway, whatever he said (and, in turn, what he said was often misrepresented by Leave-supporting media, too).
So it's a mess. The reason Cameron lost is probably because, after all, he was always going to. Anti-EU sentiment, however well-motivated or not, was too strong in this country and, given the opportunity to speak out, took it (with a little help from the indifferent).