Logging

Download objective-c eBook

Syntax

  • NSLog(@"text to log"); // Basic text log
  • NSLog(@"data: %f - %.2f", myFloat, anotherFloat); // Logging text including float numbers.
  • NSLog(@"data: %i", myInteger); // Logging text including integer number.
  • NSLog(@"data: %@", myStringOrObject); // Logging text referencing another String or any NSObject derived object.

Remarks

For logging various types of objects and data-types refer to: Objective-C, Format Specifiers

Related Examples

Stats

502 Contributors: 21
Saturday, February 11, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook