             updateCurrentStep()
         }
     }
+    /// The total number of steps in the progress bar
     public var numberOfSteps: UInt {
         didSet {
             self.updateStepByStepView()
         }
     }
+    /// The separation between steps of the progress bar
     public var stepsSeparation: CGFloat
+    /// The colour of the non completed steps in the progress bar
     public var stepsColor: UIColor
     
+    /**
+        Initialises a new StepByStep view with a given frame and with other default values:
+        5 orange steps, non of them completed and a separation of 5.0 points between them
+     
+        - Parameter frame: The frame with the size and position of the view
+     
+        - Returns: An initialised StepByStep view component
+     */
     override public init(frame: CGRect) {
         self.currentStepIndex = 0
         self.numberOfSteps = 5

        }
    }
    
    func addNecessarySteps() {
        if Int(self.numberOfSteps) > self.subviews.count {
            for index in self.subviews.count..<Int(self.numberOfSteps) {
                let view = UIView(frame: self.stepFrameForIndex(index))
                view.backgroundColor = self.stepsColor
                view.alpha = 0.0
                
                self.addSubview(view)
                
                UIView.animateWithDuration(0.2, animations: { 
                    view.alpha = 1.0
                })
            }
        }
    }
    
    func stepFrameForIndex(index: Int) -> CGRect {
        let separationsWidth = self.stepsSeparation * CGFloat(self.numberOfSteps - 1)
        let stepsWidth = (self.frame.size.width - separationsWidth) / CGFloat(self.numberOfSteps);


import UIKit

/// Simple and customisable stepped progress bar UI component
public class StepByStep: UIView {

    /// The current step within the total progress bar's number of steps
    public var currentStepIndex: UInt {
        didSet {
            if self.currentStepIndex > self.numberOfSteps {
