Replace this code:
self.categoryLabel.font.width+10
with
self.categoryLabel.frame.size.width+10
There is no property width on font. I assume you want to get width from frame of your label.
// EXTENDED
This is an example of whole rect creation line, CGRect expect 4 parameters, I listed it line by line separated by coma, I'm not sure is it what you need but it will give you some result:
CGRect rect = CGRectMake(_frame.origin.x + [self.categoryLabel.text sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:self.categoryLabel.font.pointSize]}].width, //<- this .width takes width ot the size with font but maybe you required height
y,
_imageSize.width,
_imageSize.height);
If you have a look on the line below (your old one) there is not 4 parameters:
CGRect rect = CGRectMake(_frame.origin.x + [self.categoryLabel.text sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:[self.categoryLabel.frame.size.width]+10,y,_imageSize.width,_imageSize.height]}];
it looks like it's just one so it won't work.