• 自定义tabbar


    当tabBar不能满足需求时(如需要在其中间添加一个不规则的加号按钮)

    通过KVC更换系统的tabBar

    [self setValue:[[YQTabBar alloc] init] forKeyPath:@"tabBar"];

    并更改内部按钮的frame

    - layoutSubviews

    遍历子视图,当其不是UIControl(这里是UITabBarButton)或者是添加的按钮时,就跳过

    if (![button isKindOfClass:[UIControl class]] || button == self.publishButton) continue;

  • 相关阅读:
    Unreal中的python开发
    2022.5.16
    2022.5.18
    2022.5.4
    2022.5.2
    2022.5.6
    2022.5.14
    2022.4.30
    2022.5.10
    2022.5.8
  • 原文地址:https://www.cnblogs.com/sea-star3/p/5301041.html
Copyright © 2020-2023  润新知