UINavigationBar.SetBackgroundImage 方法

定义

重载

SetBackgroundImage(UIImage, UIBarMetrics)

更改 的背景 barMetrics图像。

SetBackgroundImage(UIImage, UIBarPosition, UIBarMetrics)

设置 和 barMetrics的背景图像barPosition

SetBackgroundImage(UIImage, UIBarMetrics)

更改 的背景 barMetrics图像。

[Foundation.Export("setBackgroundImage:forBarMetrics:")]
public virtual void SetBackgroundImage(UIKit.UIImage backgroundImage, UIKit.UIBarMetrics barMetrics);
abstract member SetBackgroundImage : UIKit.UIImage * UIKit.UIBarMetrics -> unit
override this.SetBackgroundImage : UIKit.UIImage * UIKit.UIBarMetrics -> unit

参数

backgroundImage
UIImage

背景图像,或 null 以清除它。

此参数可以为 null

barMetrics
UIBarMetrics

指定工具栏的方向。

属性

注解

此成员参与 UIAppearance 样式设置系统。 Appearance请参阅 属性和 AppearanceWhenContainedIn(Type[]) 方法。

另请参阅

  • <xref:UIKit.UINavigationBar.GetBackgroundImage>

适用于

SetBackgroundImage(UIImage, UIBarPosition, UIBarMetrics)

设置 和 barMetrics的背景图像barPosition

[Foundation.Export("setBackgroundImage:forBarPosition:barMetrics:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void SetBackgroundImage(UIKit.UIImage backgroundImage, UIKit.UIBarPosition barPosition, UIKit.UIBarMetrics barMetrics);
abstract member SetBackgroundImage : UIKit.UIImage * UIKit.UIBarPosition * UIKit.UIBarMetrics -> unit
override this.SetBackgroundImage : UIKit.UIImage * UIKit.UIBarPosition * UIKit.UIBarMetrics -> unit

参数

backgroundImage
UIImage

内容待定。

此参数可以为 null

barPosition
UIBarPosition

工具栏在视图中的位置。

barMetrics
UIBarMetrics

指定工具栏的方向。

属性

注解

此成员参与 UIAppearance 样式设置系统。 Appearance请参阅 属性和 AppearanceWhenContainedIn(Type[]) 方法。

另请参阅

  • <xref:UIKit.UINavigationBar.GetBackgroundImage>

适用于