For Apple, China is looking a bit brighter these days. 

Apple (AAPL - Get Report) shares surged 5% in after-hours trading Tuesday after the company notched a solid earnings beat, posting quarterly revenue of $58 billion and earnings of $2.46 per share, versus the $57.5 billion on earnings of $2.36 per share expected by Wall Street. On Wednesday in pre-market trading, shares were were up 5.1% to $210.93 as the company once more neared a $1 trillion market cap. 

It made for quite a different tone than Apple's December quarter, when U.S.-China trade tensions and lagging consumer confidence in the market led Apple to significantly slash its estimates. China accounts for 18% of Apple's overall revenue according to FactSet. 

Sales in China were still 22% lower than at this time last year. But on a call with investors, Cook noted "improved trade dialogue between us and China -- from our point of view, it's affected consumer confidence there."

Apple also posted overall June quarter guidance that was higher than analysts had expected, signaling healthier demand for iPhones and other Apple products. Cook told investors that iPhone sales in China improved during the latter part of the quarter, and also called out price adjustments and trade-in programs as helping to move more units.

"We certainly feel a lot better [about China] than we did 90 days ago," Cook said.

Asked whether Apple would consider further price cuts in China or elsewhere, Cook sounded open to the idea. 

"We've made price adjustments in India, and seen a positive response. We try to apply what's learned in one market to other markets," he said. 

Apple is a key holding in Jim Cramer's Action Alerts PLUS charitable trust.