Fixed deprecated method

Changed `sizeWithFont:` to `sizeWithAttributes:`.