call setNeedsStatusBarAppearanceUpdate inside setSelectedIndex