Skip to content

Conversation

@hansemannn
Copy link
Collaborator

@hansemannn hansemannn commented Aug 27, 2025

This pull request adds support for using the source view ("view") parameter outside of the iPad as well. It also removes the manual "rect" handling, as modern iOS versions are able to infer the rect from the source view directly. That also makes the code more lightweight by removing manual positioning code.

This way, the option dialogs be shown as nicely presented popovers on iOS 26+:

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

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

btn.addEventListener('click', () => {
    const dialog = Ti.UI.createOptionDialog({
        title: 'Delete item',
        message: 'Do you want to delete this item?',
        options: ['Delete', 'Rename', 'Cancel'],
        cancel: 2,
        destructive: 1
    });
    
    // optional: shows as popover on iOS 26+
    dialog.show({ view: btn });
});

win.add(btn);
win.open();
iOS 18.5 iOS 26 (without view) iOS 26 (with view)
Simulator Screenshot - iPhone 16e - 2025-08-28 at 10 53 43 Simulator Screenshot - iPhone 16 Pro - 2025-08-27 at 20 38 58 Simulator Screenshot - iPhone 16 Pro - 2025-08-27 at 20 38 08

@janvennemann janvennemann merged commit ce3752b into tidev:master Sep 1, 2025
6 checks passed
@hansemannn hansemannn deleted the feature/option-dialog-ios26 branch September 1, 2025 10:17
@designbymind
Copy link

Just wanted to drop a quick note to say that this is working great on my end, haven't had any issues. The contextual OptionDialog experience is so much more intuitive, excellent addition!

hansemannn added a commit that referenced this pull request Dec 28, 2025
…14327)

* chore: add 13.0.0 changelog

* fix(android): fix transparent TextField backgroundColor (#14245)

* fix(android): fix transparent TextField backgroundColor

* fix null

* fix null

* fix null

* null == transparent

* fix: properly clean build folder (#14264)

* fix: properly handle containment of tab group (#14261)

* fix(ios): keep TableView search results on enter (#14265)

* Revert "fix: properly handle containment of tab group (#14261)" (#14266)

This reverts commit 5875cb0.

* fix(ios): improve safe area detection and trigger relayout (#14267)

* fix(ios): include top safe area inset in navigation window (#14268)

* fix(ios): improve safe area layout lifecycle (#14269)

* fix(ios): improve safe area layout lifecycle

* chore: use BOOL instead of bool

* Update iphone/TitaniumKit/TitaniumKit/Sources/API/TiViewProxy.m

---------

Co-authored-by: Hans Knöchel <hansemannn@users.noreply.github.com>

* chore: update changelog

* chore: update ioslib to 5.1.0 to support Xcode 26

* chore: update changelog

* [backport] Drop Node 16 and 18, remove engines.node (#14272)

* remove node engines, let the CLI own it

* Add back venderDependencies

* fix(ios): correct safe area for standalone windows (#14273)

* fix(ios): use proxy viewCount in ScrollableView to prevent empty display (#14275)

* chore: remove interactive dismiss mode (#14274)

* chore(ios): update xcode/ios/watchos compatibility versions

* Revert "feat(ios): support iOS 26+ source views for non-iPad devices (#14258)" (#14276)

This reverts commit ce3752b.

* chore: update module versions (#14270)

* chore: add 13.0.0.GA changelog

* chore: update 13.0.0.GA changelog

* chore(release): bump version

* fix(ios): fix ButtonConfiguration API from throwing an error on device

* fix: patch ActivityKit so it works with catalyst (#14279) (#14280)

* fix: ensure eventStoreChanged notification is not over-registered (#14282)

* feat(ios): support swift package manager (SPM) module dependencies

* chore: update iOS workflow (#14304)

* fix(ios/cli): fix linting error in module build

* chore: move spm util to ES-based module

---------

Co-authored-by: Michael Gangolf <m1ga@users.noreply.github.com>
Co-authored-by: Jan Vennemann <j.vennemann@lambus.com>
Co-authored-by: Chris Barber <chris@cb1inc.com>
Co-authored-by: narbs <c.clare@gmail.com>
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.

3 participants