Twitter CEO Jack Dorsey: What I learned from Disney's Bob Iger

Twitter CEO Jack Dorsey says working with Walt Disney Chairman and Chief Executive Bob Iger has taught him to demand optimism from his employees.

Disney has seen a remarkable reversal of fortune in the last decade following its acquisition of Pixar, which reinvigorated its animation studios, and subsequent purchases of Marvel Comics and the Star Wars franchise.

Dorsey, a Disney board member since 2013, said Iger turned around his company not only by reinvigorating its storytelling through creativity and technology, but by cultivating a culture of optimism.

Dorsey said Iger's message was clear: If you're not going to be optimistic, you're not going to be part of this company.

"That was something that was really refreshing to hear, and it's worked," he told CNBC on the sidelines of the Code Conference on Wednesday. The interview aired on Thursday on CNBC's "Squawk Alley."

"In every board meeting we have, you feel it. You feel the creativity. You feel the desire to continue to advance technology, and use technology to tell better stories. And you feel the optimism," he said.

Twitter tapped Dorsey, a founder of the social network, to lead the company amid fears that its growth was stalling. Shares of Twitter have declined nearly 60 percent over the past year as monthly active user numbers stagnate, though advertising revenue continues to grow.