ios - Color of drawInRect:withAttributes: -


Was trying to fix some alerts in the iOS app and its update has been changed:

  [[Self text] Draw: Rectit with fonts: [UIFont systemFontOfSize: kFontSize]]; [[UIColor white color] set];   

To do this:

  [[Self text] Draw Intersect: Rucket Attachments: @ {NSFontAttributeName: [UIFont systemFontOfSize: kFontSize]}]; [[UIColor white color] set];   

However now the color of the text is black ... how can I fix it?

You need to add color to properties:

  NSDictionary * Attributes = @ {NSFontAttributeName: [UIFont systemFontOfSize: kFontSize], NSForegroundColorAttributeName: [UIColor whiteColor]}; [[Self text] Draw intact: Ritch Attachments: Attributes];   

With this approach, there is no need to set color in the old way.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -