当您点击UITtextView
中出现的按钮文字时,我有一个应用。文本是在每个段落之前带有数字的句子。如何让数字从新行开始。这是我的代码:
- (IBAction)button49:(id)sender {
_genesis49.text = @"1. And Jacob called unto his sons, and said, Gather yourselves together, that I may tell you that which shall befall you in the last days.2. Gather yourselves together, and hear, ye sons of Jacob; and hearken unto Israel your father.3. Reuben, thou art my firstborn, my might, and the beginning of my strength, the excellency of dignity, and the excellency of power:4. Unstable as water, thou shalt not excel; because thou wentest up to thy father's bed; then defiledst thou it: he went up to my couch.";
}
如果可以,请帮忙。提前谢谢!
答案 0 :(得分:0)
您可以对新行使用转义字符'\ n':
示例:
_genesis49.text = @"1. Abc\n2. Cde\n3. Fgh";
我希望它可以帮到你。