我试图找出我认为是简单串联的问题所在,并且我在这里一定会遗漏某些东西-请参见下面的代码:

NSString *combinedValues = [NSString stringWithFormat:
                            @"I am at %@" self.dancePlace.text
                            @" Airport, and I will arrive on %@" danceDateValue,
                            @" from %@" timeIn,
                            @" to %@" timeOut,
                            @" at Terminal %@" self.danceTerminal.text
                            @" Gate %@" self.danceGate.text];

最佳答案

这是一个好方法

NSString *combinedValues = [NSString stringWithFormat:
                            @"I am at %@ Airport, and I will arrive on %@ from %@ to %@ at Terminal %@ Gate %@" , self.dancePlace.text, danceDateValue, timeIn, timeOut, self.danceTerminal.text, self.danceGate.text];

08-18 14:53
查看更多