Closed Lazyloadingg closed 1 year ago
我在我的swift项目中使用了QMUI,导航栏使用QMUINavigationController,控制器基类使用QMUICommonViewController,我想在不同页面设置导航栏背景色,于是我重写了qmui_navigationBarBackgroundImage方法并返回了背景图片,但是并没有生效,我单独在每个页面设置UINavigationBarAppearance这样是生效的,但是这样很麻烦,
QMUINavigationController
QMUICommonViewController
qmui_navigationBarBackgroundImage
UINavigationBarAppearance
我下载了QMUIDemo 发现demo中虽然也使用了qmui_navigationBarBackgroundImage方法,但是注释说也会在主题配置文件中查找,不使用主题配置文件的话就无法使用qmui_navigationBarBackgroundImage吗?同协议下其他方法生效,比如qmui_titleViewTintColor,只有这个无效qmui_navigationBarBackgroundImage
qmui_titleViewTintColor
我重新创建了个空的OC项目,直接使用QMUINavigationController搭配,QMUICommonViewController然后在qmui_navigationBarBackgroundImage中返回背景图,依然无效
是我使用的不对吗?
请关注配置表中的 navBarUsesStandardAppearanceOnly 相关说明。
navBarUsesStandardAppearanceOnly
我在我的swift项目中使用了QMUI,导航栏使用
QMUINavigationController
,控制器基类使用QMUICommonViewController
,我想在不同页面设置导航栏背景色,于是我重写了qmui_navigationBarBackgroundImage
方法并返回了背景图片,但是并没有生效,我单独在每个页面设置UINavigationBarAppearance
这样是生效的,但是这样很麻烦,我下载了QMUIDemo 发现demo中虽然也使用了
qmui_navigationBarBackgroundImage
方法,但是注释说也会在主题配置文件中查找,不使用主题配置文件的话就无法使用qmui_navigationBarBackgroundImage
吗?同协议下其他方法生效,比如qmui_titleViewTintColor
,只有这个无效qmui_navigationBarBackgroundImage
我重新创建了个空的OC项目,直接使用
QMUINavigationController
搭配,QMUICommonViewController
然后在qmui_navigationBarBackgroundImage
中返回背景图,依然无效是我使用的不对吗?