iOS Build a Simple iPhone App with Objective-C Views and View Controllers View Controllers and IBAction

Chris George
Chris George
9,187 Points

Why is NSLog function different from other functions?

I remember when we call methods on something we use the square bracket syntax such as [number incrementBy: 5];. Why do we use the parentheses syntax for NSLog if it is a function as well. Why not the square bracket syntax? NSLog(parameter); vs. [NSLog: parameter]; I know that the parentheses are used in swift for functions but I don't understand why just one function uses this syntax.