如何在Monotouch下的iPhone上设置按钮背景图像?

Nor*_*oro 5 c# iphone uibutton xamarin.ios ios

如何在Monotouch下的iPhone上设置按钮背景图像?如果你给我提供相同的样品会更好.谢谢.

Dim*_*kos 7

这将在按钮上设置背景图像:

button.SetBackgroundImage (UIImage.FromBundle ("imageFile"), UIControlState.Normal);
Run Code Online (Sandbox Code Playgroud)

您可以使用UIControlState参数为不同的控制状态设置不同的图像.