问题
I'm attempting to put a subtitle under a title in the action bar on iOS. While there is this solution for Android it doesn't work on iOS at all. Is there any way to do this on iOS?
<ActionBar [title]="This works" [subTitle]="I want a subtitle here"></ActionBar>
回答1:
iOS doesn't have a subtitle option. But you could use a custom title view and wrap two labels one below another.
回答2:
iOS has some sort of subtitle, but it is named as prompt
(for more detail, you can see the doc for UINavigationBar).
Unfortunately, you can't set its value from XML, so you need to use some handler - I create simple playground to demonstrate prompt property.
来源:https://stackoverflow.com/questions/54244115/nativescript-ios-action-bar-subtitle