Apple shares hit a new all-time high on Tuesday, riding a wave of praise this week from famed investor Warren Buffett.

The stock rose to $180.48 a share in intraday trading, according to FactSet, passing the previous high of $180.10. Shares hit an intraday high of $179.39 in the regular trading session on Monday, just missing the all-time high after Buffett spoke to CNBC.

"Apple has an extraordinary consumer franchise," Buffett told CNBC's "Squawk Box" on Monday following the release of an annual letter to shareholders on Saturday. "I see how strong that ecosystem is, to an extraordinary degree. … You are very, very, very locked in, at least psychologically and mentally, to the product you are using. [IPhone] is a very sticky product."

Buffett added that his firm, Berkshire Hathaway, had bought "more Apple than anything else" over the past year. Apple is now Berkshire Hathaway's second-largest position in terms of market value behind Wells Fargo and ahead of Bank of America, the company said in regulatory filings.

Apple shares have risen about 30 percent over the past year amid early expectations that a slew of customers would upgrade to new models such as the pricey iPhone X. But excitement around Apple has waned slightly, and other big tech names, such as Microsoft and Amazon, have seen faster growth. Nonetheless, Apple remains the largest public company in terms of market capitalization by a wide margin.