Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode documentation comment syntax

I was wondering if someone could explain what/if there is any difference between the following two comment syntax in Xcode.

/**
 * comments
 */

/*!
 * comments
 */

It seems like both allow Xcode to display your comments as documentation but I'm not sure if there is a difference between the two.

like image 746
strikerdude10 Avatar asked Mar 26 '26 13:03

strikerdude10


1 Answers

They are functionally equivalent. /*! is a HeaderDoc style opener and /** is a JavaDoc style opener commonly used by doxygen. Xcode 5 supports both HeaderDoc and doxygen/JavaDoc formats.

like image 80
sbooth Avatar answered Apr 02 '26 18:04

sbooth



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!