UICollectionViewCell borders one more line

Directly above, a weird black line in the red circle.
doesn’t have every Cell. It doesn’t happen every time

UICollectionViewCell borders one more line
weird black line.Png

So far, we haven’t found out where the problem is. The
project has been tight for several days

- (ID) initWithFrame: (CGRect frame) {self = [super initWithFrame:frame]; if (self) {_label = [[UILabel alloc] initWithFrame:self.bounds]; _label.backgroundColor = [UIColor colorWithRed:0.94 green:0.94 blue:0.94 alpha:1.00]; _label.font [UIFont = systemFontOfSize:14]; _label.textAlignment = NSTextAlignmentCenter; _label.textColor = [UIColor colorWithRed:0.33 green:0.33 blue:0.33 alpha:1.00] [self.contentView addSubview:_label]; return self;}};

Take some time out today and study it

- (ID) initWithFrame: (CGRect frame) {self = [super initWithFrame:frame]; if (self) {_label = [[UILabel alloc] initWithFrame:CGRectIntegral (self.bounds)]; _label.backgroundColor = [UIColor colorWithRed:0.94 green:0.94 blue:0.94 alpha: 1.00]; _label.font [UIFont = systemFontOfSize:14]; _label.textAlignment = NSTextAlignmentCenter; _label.textColor = [UIColor colorWithRed:0.33 green:0.33 blue:0.33 alpha:1.00] [self.contentView addSubview:_label]; return self;}};
UICollectionViewCell borders one more line
, there’s no weird black line.Png

Actually, it’s settled…

Upper code

_label = [[UILabel, alloc], initWithFrame:self.bounds], _label = [[UILabel, alloc], initWithFrame:CGRectIntegral (self.bounds)];

CGRectIntegral ()
. This function changes the value of a decimal type to an integer type

The value of frame to decimal, pixel rendering to the screen will produce strange shadows, is a strange black line causes
CGRectIntegral (frame) values are converted to an integer, the problem would have been solved


The white face summary, welcome.