WMZPageController icon indicating copy to clipboard operation
WMZPageController copied to clipboard

自定义菜单栏无效的问题

Open wozaihu opened this issue 3 years ago • 7 comments

我想自定义菜单栏,背景设为红色,左上角,右上角设为 20, .wCustomMenuViewSet(^(UIView *bgView) { //设置角度的代码忽略 bgView.backgroundColor=UIColor.redColor; }) 但效果一闪而逝,界面一到viewDidAppear就没效果了,如果在viewDidAppear中通过获取self.upSc.mainView设置,滑动切换 就又没效果了,请问要怎么设置呢?

wozaihu avatar Jun 14 '22 02:06 wozaihu

我想自定义菜单栏,背景设为红色,左上角,右上角设为 20, .wCustomMenuViewSet(^(UIView *bgView) { //设置角度的代码忽略 bgView.backgroundColor=UIColor.redColor; }) 但效果一闪而逝,界面一到viewDidAppear就没效果了,如果在viewDidAppear中通过获取self.upSc.mainView设置,滑动切换 就又没效果了,请问要怎么设置呢?

    .wCustomMenuViewSet(^(UIView *bgView) {
        bgView.layer.cornerRadius = 10;
        bgView.layer.masksToBounds = YES;
    })
    .wMenuBgColorSet(UIColor.redColor)

wwmz avatar Jun 14 '22 05:06 wwmz

我想自定义菜单栏,背景设为红色,左上角,右上角设为 20, .wCustomMenuViewSet(^(UIView *bgView) { //设置角度的代码忽略 bgView.backgroundColor=UIColor.redColor; }) 但效果一闪而逝,界面一到viewDidAppear就没效果了,如果在viewDidAppear中通过获取self.upSc.mainView设置,滑动切换 就又没效果了,请问要怎么设置呢?

    .wCustomMenuViewSet(^(UIView *bgView) {
        bgView.layer.cornerRadius = 10;
        bgView.layer.masksToBounds = YES;
    })
    .wMenuBgColorSet(UIColor.redColor)

谢谢,这个可以。但我现在遇到了新问题,我设置wInsertHeadAndMenuBgSet后wMenuBgColorSet就失效了,但我的界面需要两个设置都生效。 界面为:wInsertHeadAndMenuBgSet为蓝色,菜单栏背景色为白色,且菜单栏左上角和右上角设置了圆角,圆角处显示蓝色(就是wInsertHeadAndMenuBgSet的颜色),现在最新版可以实现这个效果吗?

wozaihu avatar Jun 15 '22 02:06 wozaihu

贴个图片看看是什么效果哦

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: 李尚 @.> 发送时间: 2022年6月15日 10:47 收件人: wwmz/WMZPageController @.> 抄送: WMZ @.>, Comment @.> 主题: Re: [wwmz/WMZPageController] 自定义菜单栏无效的问题 (Issue #86)

我想自定义菜单栏,背景设为红色,左上角,右上角设为 20, .wCustomMenuViewSet(^(UIView *bgView) { //设置角度的代码忽略 bgView.backgroundColor=UIColor.redColor; }) 但效果一闪而逝,界面一到viewDidAppear就没效果了,如果在viewDidAppear中通过获取self.upSc.mainView设置,滑动切换 就又没效果了,请问要怎么设置呢? .wCustomMenuViewSet(^(UIView *bgView) { bgView.layer.cornerRadius = 10; bgView.layer.masksToBounds = YES; }) .wMenuBgColorSet(UIColor.redColor)
谢谢,这个可以。但我现在遇到了新问题,我设置wInsertHeadAndMenuBgSet后wMenuBgColorSet就失效了,但我的界面需要两个设置都生效。 界面为:wInsertHeadAndMenuBgSet为蓝色,菜单栏背景色为白色,且菜单栏左上角和右上角设置了圆角,圆角处显示蓝色(就是wInsertHeadAndMenuBgSet的颜色),现在最新版可以实现这个效果吗?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

wwmz avatar Jun 15 '22 03:06 wwmz

这样的,就菜单栏有两个圆角 BCE1EEC9F6512309D6C2F8E9D49CD762

wozaihu avatar Jun 15 '22 05:06 wozaihu

贴个图片看看是什么效果哦 发自我的iPhone ------------------ 原始邮件 ------------------ 发件人: 李尚 @.> 发送时间: 2022年6月15日 10:47 收件人: wwmz/WMZPageController @.> 抄送: WMZ @.>, Comment @.> 主题: Re: [wwmz/WMZPageController] 自定义菜单栏无效的问题 (Issue #86) 我想自定义菜单栏,背景设为红色,左上角,右上角设为 20, .wCustomMenuViewSet(^(UIView bgView) { //设置角度的代码忽略 bgView.backgroundColor=UIColor.redColor; }) 但效果一闪而逝,界面一到viewDidAppear就没效果了,如果在viewDidAppear中通过获取self.upSc.mainView设置,滑动切换 就又没效果了,请问要怎么设置呢? .wCustomMenuViewSet(^(UIView bgView) { bgView.layer.cornerRadius = 10; bgView.layer.masksToBounds = YES; }) .wMenuBgColorSet(UIColor.redColor) 谢谢,这个可以。但我现在遇到了新问题,我设置wInsertHeadAndMenuBgSet后wMenuBgColorSet就失效了,但我的界面需要两个设置都生效。 界面为:wInsertHeadAndMenuBgSet为蓝色,菜单栏背景色为白色,且菜单栏左上角和右上角设置了圆角,圆角处显示蓝色(就是wInsertHeadAndMenuBgSet的颜色),现在最新版可以实现这个效果吗? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.*> 企业详情

wozaihu avatar Jun 15 '22 05:06 wozaihu

目前可能不太好实现 要加个方法适配这种UI的

wwmz avatar Jun 15 '22 12:06 wwmz

目前可能不太好实现 要加个方法适配这种UI的

好的,那我暂时先在菜单栏插入一层背景解决这个问题。留下简易代码供遇见相同问题的参考 image

wozaihu avatar Jun 16 '22 02:06 wozaihu