Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ios): apply “overrideUserInterfaceStyle” to main app window #13329

Merged

Conversation

hansemannn
Copy link
Collaborator

@hansemannn hansemannn commented Mar 26, 2022

Fixes #13328

Ti.UI.overrideUserInterfaceStyle = Ti.UI.USER_INTERFACE_STYLE_DARK;

const win = Ti.UI.createWindow({
	backgroundColor: 'blue',
	title: 'Main Window'
});
win.add(Ti.UI.createLabel({ top: 100, text: 'Window-Title should be white!' }));

const btn = Ti.UI.createButton({
	title: 'Open Sub-Window'
});

btn.addEventListener('click', () => {
	const window = Ti.UI.createWindow({ title: 'Sub-Window', backgroundColor: 'red' });
	window.add(Ti.UI.createLabel({ top: 100, text: 'Window-Title should be white!' }));
	const nav = Ti.UI.createNavigationWindow({ window });
	nav.open({ modal: true });
});

win.add(btn);

const nav = Ti.UI.createNavigationWindow({ window: win });
nav.open();

@hansemannn
Copy link
Collaborator Author

@mbender74 Can you maybe review this one?

@hansemannn
Copy link
Collaborator Author

hansemannn commented Apr 6, 2022

Anyone else (maybe @caspahouzer) who can test this?

Copy link
Contributor

@caspahouzer caspahouzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Simulator Screen Shot - iPhone 13 Pro Max - 2022-04-06 at 10 10 33

@hansemannn hansemannn merged commit 07c7422 into tidev:master Apr 6, 2022
@mbender74
Copy link
Contributor

sorry, late for the party.... I will submit soon another fix for control the background color (in the screen black) to be able to coloring it as wanted....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS: Overriding the dark mode / light mode is not applied to modal windows
3 participants