While it is true that Shatner and Nimoy have become best friends, they weren't particularly close during the three years while making TOS. After reading Gene Roddenberry's biography and Herb Solow and Robert Justman's making of Star Trek book, it is clear that during the making of Star Trek, Shatner and Nimoy didn't like each other at all.
It's not clear to me. Sure, it's well-documented that they were each very motivated for their characters to be important and successful, and they fought over lines, etc. However, can we infer from those facts that they "didn't like each other"? I can't.