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): window.setToolbar() background color alway transparent on iOS 15 #13165

Merged
merged 1 commit into from Nov 4, 2021

Conversation

jquick-axway
Copy link
Contributor

JIRA:
https://jira.appcelerator.org/browse/TIMOB-28574

Summary:

  • On iOS 15, the Window.setToolbar() background color is always wrongly transparent on iOS 15.
    • "barColor" property is always ignored.
    • Default background color should be gray (like nav bar) if "barColor" is not set.
  • Causes by iOS 15 breaking-change which requires us to also set the scrollEdgeAppearance to make this work.

Test:

  1. Build and run the below code on iOS 15.
  2. Verify bottom toolbar has a gray background like top nav bar.
  3. Uncomment the below "barColor" and "backgroundColor" lines.
  4. Re-build and run on iOS 15.
  5. Verify bottom toolbar has an orange background.
const rootWindow = Ti.UI.createWindow({
//	barColor: "orange",
//	backgroundColor: "yellow",
	title: "Test App",
});
const button1 = Ti.UI.createButton({
	title: "Button 1",
	color: "red",
});
button1.addEventListener("click", () => { alert("Clicked: Button 1"); });
const button2 = Ti.UI.createButton({
	title: "Button 2",
});
button2.addEventListener("click", () => { alert("Clicked: Button 2"); });
rootWindow.setToolbar([button1, button2], {
	animated: true,
//	barColor: "orange",
	tintColor: "purple",
});
rootWindow.add(Ti.UI.createLabel({ text: "iOS setToolBar() Test" }));
const navigationWindow = Ti.UI.createNavigationWindow({
	window: rootWindow,
});
navigationWindow.open();

@build
Copy link
Contributor

build commented Nov 4, 2021

Warnings
⚠️ Tests have failed, see below for more information.
Messages
📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖 ❌ 1 tests have failed There are 1 tests failing and 1157 skipped out of 20851 total tests.
📖

💾 Here's the generated SDK zipfile.

Tests:

ClassnameNameTimeError
ios.iphone.Titanium.UI.iOS.CollisionBehavior.exampleworks (15.0.0)15.001
Error: Timeout of 15000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)

Generated by 🚫 dangerJS against 1bcfc49

Copy link
Contributor

@garymathews garymathews left a comment

Choose a reason for hiding this comment

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

CR: PASS
FT: PASS

@garymathews garymathews merged commit 331bdf2 into tidev:master Nov 4, 2021
@ewanharris ewanharris added the backport 10_1_X when applied, PRs with this label will get an auto-generated backport to 10_1_X branch label Nov 17, 2021
@build build removed the backport 10_1_X when applied, PRs with this label will get an auto-generated backport to 10_1_X branch label Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

barColor and tintColor does not work on window.setToolbar iOS 15
4 participants