ios - stringbyappendingstring different size and font types -
i have nsstring letter , signature. need combine both single string display signature needs display in different font , size. yes, both fonts , sizes working on own.
right have follows:
nsstring *letter; nsstring *signoff; _paragraph.font = [uifont fontwithname:@"beinetcondensed" size:14]; _signature.font = [uifont fontwithname:@"annoyingkettle" size:18]; letter = [_paragraph text]; signoff = [_signature text]; nsstring *completedletter = [letter stringbyappendingstring:signoff];
completedletter displays same size , font type.
you're playing in wrong ball park - looking in wrong place - barking wrong tree - using wrong class.
text
, nsstring , stringbyappendingstring
have no size or font information. fonts of _paragraph
, _signature
utterly irrelevant; simply ways in views display strings of lack font @ all. thus, when combine strings have no fonts, still wind string has no font.
if want work strings do have size , font information, need start working nsattributedstring (and attributedtext
).
this single nsattributedstring:
ios nsstring uifont
No comments:
Post a Comment