Nativescript: [iOS] Custom ActionBar and rotation

Created on 22 Feb 2018  ยท  2Comments  ยท  Source: NativeScript/NativeScript

Hello,
I was testing the custom title view example written here:

https://docs.nativescript.org/angular/ui/action-bar#using-a-custom-title-view1

If I take it as it is it works (even if the title attribute in the ActionBar is not needed) but if you put stretch="none" to the image or if I remove the image completely, it is shown correctly when the view is opened but on rotation the text goes on the right, and stays there even if I rotate the phone back in portrait.

This is the sample code:

<ActionBar>
    <StackLayout orientation="horizontal"
                 ios:horizontalAlignment="center"
                 android:horizontalAlignment="left">
        <Label text="NativeScript"  class="action-label"></Label>
    </StackLayout>
</ActionBar>

First run:

one

Rotate:

two

Rotate back:

three

I've asked on the forum before adding this issue:

https://discourse.nativescript.org/t/ios-custom-actionbar-and-rotation/4597

It looks like a bug...

This is my environment:

โ”‚ Component        โ”‚ Current version โ”‚ Latest version โ”‚ Information โ”‚
โ”‚ nativescript     โ”‚ 3.4.2           โ”‚ 3.4.2          โ”‚ Up to date  โ”‚
โ”‚ tns-core-modules โ”‚ 3.4.1           โ”‚ 3.4.1          โ”‚ Up to date  โ”‚
โ”‚ tns-android      โ”‚ 3.4.1           โ”‚ 3.4.1          โ”‚ Up to date  โ”‚
โ”‚ tns-ios          โ”‚ 3.4.1           โ”‚ 3.4.1          โ”‚ Up to date  โ”‚

Thanks,
Dem

done ios

Most helpful comment

@demetrio812 I can confirm that indeed this is unexpected behavior and is definitely a bug.
The good news is that this one is already fixed and the fix is merged into the master branch.
The fix will be included in our next official release.
Meanwhile, you can test it at your side by using tns-core-modules@next.

Demonstration test application using the next modules can be found here

All 2 comments

@demetrio812 I can confirm that indeed this is unexpected behavior and is definitely a bug.
The good news is that this one is already fixed and the fix is merged into the master branch.
The fix will be included in our next official release.
Meanwhile, you can test it at your side by using tns-core-modules@next.

Demonstration test application using the next modules can be found here

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings