gpt4 book ai didi

Xamarin 自定义控件,如何添加要在 Xcode 面板中显示的属性?

转载 作者:行者123 更新时间:2023-12-02 21:28:24 25 4
gpt4 key购买 nike

我想实现自定义控件,但是官方的案例太有限,我无法了解更多。我现在想知道的是我要给我的控件添加一个属性,比如Title,这个属性必须可以随意填写在Xcode控件属性面板中。

我当前的学习文档:https://developer.xamarin.com/guides/mac/user-interface/custom-controls/

最佳答案

正如我在您也问 here 时指出的那样:

So if you are referring to:

https://developer.xamarin.com/guides/ios/user_interface/designer/ios_designable_controls_walkthrough/#Adding_Design-Time_Properties

(since it contains UIImage), that is discussing Xamarin Studio's built in iOS designer. Xamarin.Mac does not have such a feature.

The Xcode way of doing this is via IBInspectable / IBDesignable

http://nshipster.com/ibinspectable-ibdesignable/

however, Xcode / Xamarin.Mac does not have support for this.

关于Xamarin 自定义控件,如何添加要在 Xcode 面板中显示的属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43417067/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com