Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26617] iOS : Add click event listener to the back-button of a Window (part of the NavigationWindow)

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterPrashant Saini
AssigneeEric Merriman
Created2018-11-02T13:23:12.000+0000
Updated2018-11-29T23:41:38.000+0000

Description

Use case: We want to run some code first before closing the window without creating a custom back-button which is not easy to create exactly looking button as native iOS provides on a Window. In Android, we can add a custom method to onHomeIconItemSelected for the up-arrow icon to call our custom method where we can even close the window. In iOS: We cannot call any method upon clicking the back-button of Window where we can run some validations before closing the window. Current Solution: Create left-nav button with a back arrow icon and set click event listener to it. This is not a proper way as the padding, size, back-icon are very hard to match as provided by native iOS Window itself. So we should add similar property or override iOS back-button click event. See attached screenshot for clear understanding.

Attachments

FileDateSize
2 - Forgot Password.png2018-11-02T13:23:10.000+0000136051

Comments

  1. Sharif AbuDarda 2018-11-03

    Hello, Can you please share the native guide on the feature? We will consider it. Thanks.
  2. Prashant Saini 2018-11-04

    Hi, I couldn't find native docs on this much as but I did find some hacks on Google. Since I'm not a native iOS guy, so could you please refer to your iOS team to look into this as I believe they can confirm on this?

JSON Source