当页面显示时一直奔溃,错误提示-[UICachedDeviceWhiteColor pointSize]: unrecognized selector sent to instance
原因是设置导航字体颜色时[self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIColor whiteColor]}];搞错了写成了设置字号了,正确应该是[self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];还是在stackoverflow上面找到了解释。
时间: 2024-10-18 07:32:41