         }
         return pos
     }
+
 
   
     /*

          
          self.selectUserWeight();
        }
      })
        
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
      
        var ad = UIApplication.sharedApplication().delegate as AppDelegate
        healthStore = ad.healthStore;
        self.loadWeightArray()
//        self.selectUserWeight()
        self.stepCounter = StepCounter(healthStore: healthStore, delegate: self);
      
      healthStore.requestAuthorizationToShareTypes(dataTypesToWrite(), readTypes: dataTypesToRead(), completion: {
        (success:Bool, error:NSError!) -> Void in
        //      if !success{
        //        var alert = UIAlertView(title: "Missed authorization", message: "The app cannot work without authorization for HealthKit. Closing", delegate: nil, cancelButtonTitle: nil, otherButtonTitles: "Close")
