drawinrect

drawInRect:withAttributes vs drawInRect:withFont:lineBreakMode:alignment

倾然丶 夕夏残阳落幕 提交于 2019-12-03 10:36:58
问题 I'm working on a new version of my app and am attempting to replace deprecated messages, but am not able to get past this one. I can't figure out why drawInRect:withAttributes is not working. The code displays properly when drawInRect:withFont:lineBreakMode:alignment message is sent, but does not work when drawInRect:withAttributes is sent. I'm using the same rect and font and I what I believe is the same text style. The constants are just positioning the rect just below an image, but I'm

drawInRect:withAttributes vs drawInRect:withFont:lineBreakMode:alignment

拜拜、爱过 提交于 2019-12-03 01:08:24
I'm working on a new version of my app and am attempting to replace deprecated messages, but am not able to get past this one. I can't figure out why drawInRect:withAttributes is not working. The code displays properly when drawInRect:withFont:lineBreakMode:alignment message is sent, but does not work when drawInRect:withAttributes is sent. I'm using the same rect and font and I what I believe is the same text style. The constants are just positioning the rect just below an image, but I'm using the same rect for both calls, so I'm certain the rectangle is correct. (note that bs.name used below