iOS 15 (xcode 13) 更新后出现的bug


UITableView sectionHeader下移22像素?

swift

if#available(iOS15.0, *) {

            self.mainTableView.sectionHeaderTopPadding =0        }

OC

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

            _downloadTableView.sectionHeaderTopPadding = 0;

        }


导航背景颜色修改无效?

swift

if #available(iOS 15.0, *) {

            let appearance = UITabBarAppearance()

            appearance.configureWithOpaqueBackground()

            if darkMode {

                appearance.backgroundColor = UIColor.darkBackgroundColour

            } else {

                appearance.backgroundColor = .white

            }

            appearance.shadowImage = nil

            appearance.shadowColor = nil

            appDelegate.tabBarController.tabBar.standardAppearance = appearance

            appDelegate.tabBarController.tabBar.scrollEdgeAppearance = appDelegate.tabBarController.tabBar.standardAppearance

        }


OC

if (@available(iOS 15.0, *)) {

        UINavigationBarAppearance *barApp = [UINavigationBarAppearance new];

        barApp.backgroundColor = [[UIColor blueColor] colorWithAlphaComponent:0.5];

        self.navigationController.navigationBar.scrollEdgeAppearance = barApp;

        self.navigationController.navigationBar.standardAppearance = barApp;

    }

你可能感兴趣的:(iOS 15 (xcode 13) 更新后出现的bug)