Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Latest commit

 

History

History
42 lines (30 loc) · 1.52 KB

CONTRIBUTING.md

File metadata and controls

42 lines (30 loc) · 1.52 KB

Contribution Guidelines

General Guidelines

  • Min iOS SDK: 7.0
  • Language: Objective-C only.
  • Tests: Yes, please

Architecture guidelines

  • Avoid singletons that don't encapsulate a finite resource
  • Never expose mutable state
  • Designed to be called from the main thread (this is a UI library)
  • Keep classes/methods sharply focused
  • Stay generic

Style Guide

Base style:

Please add new code to this project based on the following style guidelines:

Among other things, these guidelines call for:

  • Open braces on the same line; close braces on their own line
  • Always using braces for 'if' statements, even with single-liners
  • No spaces in method signatures except after the scope (-/+) and between parameter segments
  • Use dot-notation, not setXXX, for properties (e.g. self.enabled = YES)
  • Asterisk should touch variable name, not type (e.g. NSString *myString)
  • Prefer static const declarations over #define for numeric and string constants
  • Prefer private properties to ‘naked’ instance variables wherever possible
  • Prefer CGGeometry methods to direct access of CGRect struct

Additions:

  • Prefix all class names with YMPrompt
  • Prefix all constants with kYM
  • Group related methods with #pragma mark
  • Keep as much of the API private as practical