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) Fix app freezing when trying to hide & show popover repeatedly and popover layout issues #13929

Merged
merged 6 commits into from
Oct 6, 2023

Conversation

AhmedMSayed
Copy link
Contributor

Fixes 13915

Sample


const win = Ti.UI.createWindow();

const hidePopover = Ti.UI.createButton({
	title: 'Hide Popover',
	backgroundColor: 'orange',
	width: 160,
	height: 40
});
hidePopover.addEventListener("click", (e) => {
	popover.hide();
});

const showPopover = Ti.UI.createButton({
	title: "Show Popover",
	backgroundColor: 'red',
	width: 120,
	height: 40
});

showPopover.addEventListener("click", (e) => {
	const popoverWin = Ti.UI.createWindow({
		backgroundColor: 'red',
		title: 'Popover Window',
		rightNavButton: hidePopover
	});

	const listView = Ti.UI.createListView({
		backgroundColor: 'blue',
	});
	const sections = [];

	const fruitDataSet = [
		{ properties: { title: 'Apple' } },
		{ properties: { title: 'Banana' } },
	];
	const fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits', items: fruitDataSet });
	sections.push(fruitSection);

	const vegDataSet = [
		{ properties: { title: 'Carrots' } },
		{ properties: { title: 'Potatoes' } },
	];
	const vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables', items: vegDataSet });
	sections.push(vegSection);

	listView.sections = sections;

	popoverWin.add(listView);

	const fishDataSet = [
		{ properties: { title: 'Cod' } },
		{ properties: { title: 'Haddock' } },
	];
	const fishSection = Ti.UI.createListSection({ headerTitle: 'Fish', items: fishDataSet });
	listView.appendSection(fishSection);

	const popoverNav = Ti.UI.createNavigationWindow({
		window: popoverWin
	});

	popover = Ti.UI.iPad.createPopover({
		contentView: popoverNav
	});

	popover.show({ view: showPopover });
});

win.add(showPopover);

win.open();

Copy link
Collaborator

@hansemannn hansemannn left a comment

Choose a reason for hiding this comment

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

Some quick questions, but nothing blocking.

iphone/Classes/TiUIiPadPopoverProxy.m Show resolved Hide resolved
iphone/Classes/TiUIiPadPopoverProxy.m Show resolved Hide resolved
iphone/Classes/TiUIiPadPopoverProxy.m Show resolved Hide resolved
iphone/Classes/TiUIiPadPopoverProxy.m Show resolved Hide resolved
@hansemannn
Copy link
Collaborator

@AhmedMSayed Can you please sign the CLA? Then we're good to go! @cb1kenobi what's the website again? 😇

@AhmedMSayed
Copy link
Contributor Author

@AhmedMSayed Can you please sign the CLA? Then we're good to go! @cb1kenobi what's the website again? 😇

Sure just tell me how

@cb1kenobi
Copy link
Contributor

@AhmedMSayed Huge thanks for the contribution! Please read https://github.com/tidev/organization-docs/blob/main/AUTHORIZED_CONTRIBUTORS.md, then fire off an email or ping Josh to send you a Docusign link. Apologies for the hassle.

@hansemannn
Copy link
Collaborator

@AhmedMSayed @joshualambert This is the last blocker for the 12.2.1. If you folks can handle the CLA today, we can release the version 😊

@AhmedMSayed
Copy link
Contributor Author

@hansemannn I see new issue when presenting popover from modal window
I fixed it by present popover from topPresentedController, I tested it again and it works

@hansemannn
Copy link
Collaborator

Now only the CLA is pending and then we can merge and release 12.2.1!

@AhmedMSayed
Copy link
Contributor Author

Already talked to Josh and signed in docusign, didn't know what i can do next

@cb1kenobi
Copy link
Contributor

I pinged Josh. He needs to verify it's been signed and update https://github.com/tidev/organization-docs/blob/main/AUTHORIZED_CONTRIBUTORS.md.

@hansemannn hansemannn merged commit 5807514 into tidev:master Oct 6, 2023
@cb1kenobi
Copy link
Contributor

Awesome, thanks @AhmedMSayed!

hansemannn pushed a commit that referenced this pull request Oct 6, 2023
…edly and popover layout issues (#13929)

* fix: (iOS) Remove unused methods

* fix: (iOS) App freezing when trying to hide & show popover repeatedly

* fix: (iOS) Fix deprecated methods

* fix: (iOS) Fix layout issues in Ti.UI.iPad.Popover

* fix: (iOS) Add some enhancements

* fix: (iOS) Fix presenting popover from modal window not working
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.

Popover has glitch UI in iPadOS 17 and makes app freezing
3 participants