iOS auto calculate height or width of string