Skip to content

Commit

Permalink
Update index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jihoonahn authored Dec 14, 2024
1 parent 10168dd commit e1f34c3
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions swift/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,35 @@ import Builder
import Snapkit
```

#### Comment
Use `///` to leave comments used for documentation.
```swift
/// Banner image exposed at the top of the main screen
final class BannerView: UIView {

/// Image to float banner image View
var bannerImageView: ImageView!
}
```

Use `// MARK:` to separate codes by type.
```swift
// MARK: Properties

let nameLabel: UILabel!
let dismissButton: UIButton!

// MARK: Initalizer

override init(frame: CGRect) {
// ...
}

// MARK: Actions

override func dismissButtonDidTap() {
// ...
}
```

### Patterns

0 comments on commit e1f34c3

Please sign in to comment.