What is the syntax for new line in Objective-C?

前端 未结 6 1016
眼角桃花
眼角桃花 2020-12-17 15:07

Can anyone tell me what is the symbol used for new line?

In the C language we use \'\\n\' for new line. What do we use in Objective-C?

is it sam

6条回答
  •  死守一世寂寞
    2020-12-17 15:16

    It's the same, but if you are printing to the console, you should use

    NSLog(@"This is a console statement\n on two different lines");
    

    Hope this helps.

提交回复
热议问题