以label为例:
//设置文字过长时的显示格式 aLabel.lineBreakMode = UILineBreakModeMiddleTruncation; //截去中间 aLabel.lineBreakMode = UILineBreakModeTailTruncation; //截去尾部 aLabel.lineBreakMode = UILineBreakModeHeadTruncation; //截去头部 aLabel.lineBreakMode = UILineBreakModeCharacterWrap; //保留整个字符 aLabel.lineBreakMode = UILineBreakModeClip; //截去多余部分