首先:Xcode自动完成功能适用于我的其他项目或新创建的项目。
我在过去的4-5天内只在我的一个特定项目中遇到过这个问题。 Xcode自动完成不适用于我的所有.m(实现)文件。它还显示了所有黑色文本,除了" self"," @ implementaion"和" @ property"关键字颜色正确。我尝试了很多东西但却找不到任何东西。
以下是一些代码: -
self.myBackgroundView = [[UIView alloc] init];
self.myBackgroundView.layer.cornerRadius = 4.0;
self.layer.cornerRadius = 4.0;
[self addSubview:self.myBackgroundView];
self.myPriceLabel = [[UILabel alloc] init];
self.myPriceLabel.textColor = [UIColor white];
self.myPriceLabel.font =[MyFiles defaultFontWithSize:12.0];
[self addSubview:self.myPriceLabel];
self.myDiscountLabel = [[UILabel alloc] init];
self.myDiscountLabel.font = [MyFiles defaultFontWithSize:12.0];
self.myDiscountLabel.textColor = [UIColor black];
[self addSubview:self.discountLabel];