objective c - Change placeholder colour -
i used code change placeholder colour it's not working.
i used method in category.
-(void) drawplaceholderinrect:(cgrect)rect { [[uicolor bluecolor] setfill]; [[self placeholder] drawinrect:rect withfont:[uifont systemfontofsize:16]]; } error: category implementing method implemented :
'drawinrect:withfont:' deprecated: first deprecated in ios 7.0 - use -drawinrect:withattributes:
try:
[[self placeholder] drawinrect:rect withattributes:@{ nsfontattributename: [uifont systemfontofsize:16], nsbackgroundcolorattributename: [uicolor bluecolor], nsforegroundcolorattributename: [uicolor greencolor], //font color }];
instead of 'drawinrect:withfont:'
*attributes nsdictionary attributes want, , there can specify font want, among stuff, color, etc.
Comments
Post a Comment