0

I am trying to log the segue identifier for debugging purpose.

I tried this:

NSString * string = [NSString stringWithFormat:@"test %@", segue.identifier];
        NSLog(string);

and I tried this:

NSLog([NSString stringWithFormat:@"test %@", segue.identifier]);

In both ways, Xcode shows a warning message states that format string is not a string literal

Why it is not string? I checked the segue.identifier property and it is from type NSString *

I am using Xcode 5.0.2 on OS 10.9

I appreciate your help.

Regards,

Carol Smith
  • 199
  • 1
  • 1
  • 16
  • http://stackoverflow.com/questions/1677824/warning-format-not-a-string-literal-and-no-format-arguments – iPatel May 27 '14 at 08:24

1 Answers1

0

use/try this

NSString * string = [NSString stringWithFormat:@"test %@",segue.identifier];

NSLog(@"your seque identifier is ==%@",string);
Anbu.Karthik
  • 82,064
  • 23
  • 174
  • 143