             animateViewBackToOrigin()
         }
     }
+    ///Computed var returning the optional first TimerSetting in the list.
+    var firstTimerSetting: TimerSetting? {
+        return timerSettings.first
+    }
     ///Set to the original incremental value
     fileprivate func setDefaultIntervalSetting() {
         incrementalValue = timerSettings[0].increment
     }
-    /**
-        Sets the timer with the interval
-        - parameters:
-          - interval: The double interval for executing the timer
-     */
+
+    ///Sets the timer with the interval
+    /// - Parameter interval: The double interval for executing the timer
     fileprivate func addTimer(_ interval: Double) {
         timer = Timer.scheduledTimer(timeInterval: interval,
                                      target: self,

    fileprivate var originalConstant: CGFloat = 0.0
    fileprivate var movesUp = true
    fileprivate var currentTimerSetting: TimerSetting! = nil
    /**
        Initializes the gesture
        - parameters:
          - constraint: The constraint attached to the Barceloneta view
          - axis: The axis : .horizontal or .vertical
          - delegate: The object receiving events for the view
     */
    public func makeElastic(withConstraint constraint: NSLayoutConstraint,
                            onAxis axis: Axis,
                            andDelegate delegate: BarcelonetaDelegate) {


    ///Called when the view moves (dragged by the user)
    @objc func panned(_ sender: UIPanGestureRecognizer) {
        if sender.state == .began, let beginTimerSeeting = firstTimerSetting {
            delegate?.barcelonetaDidStartMoving(self)
            //The first set of the timer
            addTimer(beginTimerSeeting.timer)
            timerHasBeenCalledAtLeastOnce = false
        }

        let translationValue = self.axis == .vertical ? sender.translation(in: self).y : sender.translation(in: self).x
        //If ! movesUp, consider that the view moves down
        movesUp = self.axis == .vertical ? (translationValue < 0) : (translationValue > 0)
        moveConstraint.constant = movingValue(translation: translationValue,
                                              limit: draggingLimit,
                                              constant: originalConstant)
        percentage = percentage(limit: draggingLimit, constant: moveConstraint.constant)

        //Find a timer setting matching the percentage
        if let timerSetting = timerSettings.filter({return $0.range ~= percentage}).first {
