egret: How to cancel the default selection of tabBar?

The documentation says "The TabBar class displays an identical set of tabs. One tab can be selected at a time, and the first tab is selected by default."
Problem: Setting tabBar.selectedIndex = -1 does not achieve the effect of deselecting the default selection . .

Solution: set tabBar.requireSelection = false;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324768388&siteId=291194637