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): only show popover presentation style if popover view exists #13803

Merged
merged 2 commits into from
Apr 18, 2023

Conversation

hansemannn
Copy link
Collaborator

@hansemannn hansemannn commented Apr 15, 2023

Prior to this change, the photo gallery would always attempt to be presented as a popover, even if no popover view was provided. This change fixes that behavior, resulting in proper gallery dialogs.

In addition, this PR fixes an issues where the dialog would fail on every 2nd run when being dismissed interactively.

Before After

Example:

const win = Ti.UI.createWindow({
	backgroundColor: '#fff'
});

const btn = Ti.UI.createButton({
	title: 'Show Photo Gallery'
});

btn.addEventListener('click', () => {
	Ti.Media.openPhotoGallery({
		success: () => {}
	});
});

win.add(btn);
win.open();

@hansemannn hansemannn requested a review from janvennemann April 15, 2023 16:32
@hansemannn hansemannn merged commit 4e6a526 into tidev:master Apr 18, 2023
@hansemannn hansemannn deleted the fix/ipad-popover branch April 18, 2023 17:53
hansemannn added a commit that referenced this pull request Apr 18, 2023
…#13803)

* fix(ios): only show popover presentation style if popover view exists

* fix: handle existing view controller state gracefully
narbs pushed a commit to narbs/titanium_mobile that referenced this pull request Jun 7, 2023
…tidev#13803)

* fix(ios): only show popover presentation style if popover view exists

* fix: handle existing view controller state gracefully
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.

2 participants