I have a string that is being drawn with the code
[@"-" drawInRect: r
withFont: f2
lineBreakMode: UILineBreakModeWordWrap
alignment: UITextAlignmentCenter];
However I want to change the color in this string, since this is not possible with NSString I wish to modify it to an NSAttributedString.
However this isn't working, here is my modified code, I couldn't find the attributes for the other parameters as well
NSDictionary *attrsDictionary = [NSDictionary dictionaryWithObjectsAndKeys:f2,NSFontAttributeName,
nil];
NSAttributedString *drawingString = [[NSAttributedString alloc] initWithString:@"-" attributes:attrsDictionary];
[drawingString drawInRect:r];
Any Help is appreciated whether this is the right way to do this.