1.0 Comments

Comments

  • can nest comments
  • use to explain why code does something
  • try to avoid block comments inline with code
// this is a single line comment
/*
   this is a multi-line comment
*/

Landmarks

  • break up the jump bar’s drop-down (like Obj-C’s pragma mark)
  • MARK with just the  adds a line separator only
// landmarks
// MARK: -
// MARK: - <Title> - // TODO: <Title> // FIXME: <Title>

Markdown

  • to see the notes, hold the ⌥ key on the item
/// # nada - The useless method
/// ---
/// This method really doesn't do anything at all useful.
/// It's in the application purely as an example.
/// - Parameter this:String describing this
/// - Parameter that:String describing that
/// - Returns : 1
/// - Throws : Tons of errors
/// ```swift
/// let one = nada("blah", "blah")
/// NSLog("\(one)")

// click nada while holding option key
func nada(this: NSString , that: NSString ) -> Int {
    return (1)
}