Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 553 Bytes

SwiftMethodSignatures.md

File metadata and controls

21 lines (16 loc) · 553 Bytes

In swift we can declare methods in different ways, like;

func configureCommentCell(_ cell: PostCommentCell, atIndexPath indexPath: IndexPath) {
	...
}
func configure(_ cell: PostCommentCell, at indexPath: IndexPath) {
	...
}

For now there is no strict rule to pick one of two. However, for consistency we recommend to use just one approach for any project.

Also an invalid signature could be like this;

func configureComment(cell: PostCommentCell, atIndexPath: IndexPath)