SanitLee SanitLee - 1 month ago 7
iOS Question

Changing size of text NSString in collection view cell

I have text in collection cell. How can I change size of the text which is NSString? I've tried something like

cell.author.text.font = [UIFont systemFontOfSize:12.0];


But it's not allowed, it says Property 'font' not found on object of type 'NSString'

CollectionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:identifier forIndexPath:indexPath];

cell.author.text = detailData.author;

Answer

I think, this:

cell.author.text.font = [UIFont systemFontOfSize:12.0];

should be, this:

cell.author.font = [UIFont systemFontOfSize:12.0];