Nativescript behavior of the '< Go Back' button

前端 未结 2 1088
迷失自我
迷失自我 2021-01-24 01:14

I\'ve got the following ActionBar definition

2条回答
  •  无人及你
    2021-01-24 01:20

    So as @nick verified, on iOS version of {N} one cannot get the tap event of the Navigation button. I understand why {N} has to add the BACK button automatically if the navigation button is not there (because iPhones don't have a physical BACK button), but not calling an existing tap event is, IMHO, adding unnecessary differences in the framework. Here's the proposed logic for iOS.

    if NavigationButton present then if tap event handler set by user then use it else auto-gen a tap event handler else auto-gen a back-button and a tap event handler

    Anyway here's how I'm getting around this issue for my app.

    This gets the behavior I expect and is cross-platform compatible with the Android version.

提交回复
热议问题