首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在iOS上编辑NativeScript-Angular RadDataForm UIStepper?

如何在iOS上编辑NativeScript-Angular RadDataForm UIStepper?
EN

Stack Overflow用户
提问于 2019-05-20 21:33:57
回答 1查看 231关注 0票数 1

NativeScript-Angular应用程序中,我正在尝试设计RadDataForms TKPropertyEditor的样式。对于iOS上的步进编辑器,我希望增加控件和显示值之间的距离,但我找不到访问它们的方法。

我使用的是nativescript-ui-dataform: 4.0.0

代码语言:javascript
复制
<TKEntityProperty tkDataFormProperty name="grade" 
    displayName="Bewertung (1 – 10)" index="1">
  <TKPropertyEditor tkEntityPropertyEditor type="Stepper">
    <TKPropertyEditorParams tKEditorParams minimum="1" maximum="10" 
      step="1"></TKPropertyEditorParams>
    <TKPropertyEditorStyle tkPropertyEditorStyle valuePosition="Left"> 
    </TKPropertyEditorStyle>
  </TKPropertyEditor>
</TKEntityProperty>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-05-20 23:28:41

参考高级样式examples here,您可以直接修改原生对象来样式化您的元素。

代码语言:javascript
复制
 public editorSetupStepperIOS(editor) {
    editor.valueLabel.textColor = colorDark.ios;

    const coreEditor = <UIStepper>editor.editor;
    coreEditor.tintColor = colorLight.ios;

    for (let i = 0; i < coreEditor.subviews.count; i++) {
        if (coreEditor.subviews[i] instanceof UIButton) {
            (<UIButton>coreEditor.subviews[i]).imageView.tintColor = colorDark.ios;
        }
    }
    const editorView = editor.editorCore;
    editorView.labelAlignment = TKGridLayoutAlignment.Left;
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56222066

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档