美文网首页
IOS13 适配

IOS13 适配

作者: 流星阁 | 来源:发表于2019-10-24 10:49 被阅读0次

    1.UITabbar 标题颜色变成系统蓝色

    if(@available(iOS13.0, *)) {

            // iOS 13以上

            self.tabBar.tintColor=KHexColor(@"313235");

            self.tabBar.unselectedItemTintColor = KHexColor(@"CCD0D3");

            UITabBarItem *item = [UITabBarItem appearance];

    //        item.titlePositionAdjustment = UIOffsetMake(0, -2);

            [itemsetTitleTextAttributes:@{NSFontAttributeName:[UIFont fontWithName:@"PingFangSC-Regular" size:10]} forState:UIControlStateNormal];

            [itemsetTitleTextAttributes:@{NSFontAttributeName:[UIFont fontWithName:@"PingFangSC-Regular" size:10]} forState:UIControlStateSelected];

        }else{

            [[UITabBarItem appearance]setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor hexColorWithString:@"CCD0D3"],NSFontAttributeName:[UIFont fontWithName:@"PingFangSC-Regular" size:10]} forState:UIControlStateNormal];

            [[UITabBarItem appearance]setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor hexColorWithString:@"313235"],NSFontAttributeName:[UIFont fontWithName:@"PingFangSC-Regular" size:10]} forState:UIControlStateSelected];

        }

    2.present 不全屏

    带导航跳转的  navigation.modalPresentationStyle = UIModalPresentationFullScreen;

    不带导航跳转 vc.modalPresentationStyle = 0;

    3.禁用暗黑模式

    info.plist 中添加 User Interface Style   设置为Light

    4.各个版本xcode下载

    https://developer.apple.com/download/more/

    相关文章

      网友评论

          本文标题:IOS13 适配

          本文链接:https://www.haomeiwen.com/subject/fypuwqtx.html