Break up long formatted NSString over multiple lines

Yes there is. Adjacent strings will be concatenated for you by the compiler.

NSString *info = [NSString stringWithFormat:@"\n Elapsed Time  \n"
                      "Battery Level:  \n"
                      "Torque:  \n"
                      "Energy Used  \n"
                      "Energy Regenerated:\n Cadence: \n"
                      "Battery Temp: \n"
                      "Motor Temp: \n"
                      "Incline: \n Speed MPH: \n" 
                      "Speed KPH:\n"
                      "Avg Speed MPH: %f \n"
                      "Avg Speed KPH:\n"
                      "Distance Miles:\n"
                      "Distance Km: \n"
                      "Time Date Stamp:\n"];
NSLog(info);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)