Question: I have a bar chart as below
![enter image description here](https://i.stack.imgur.com/IYHVY.jpg)

the horizontal axis has months and years,is there any way i can sort the months order?
like January,february,March...

thanks in advance

Answer: 
Setting the frame directly doesn't work, but you can still use AutoLayout to put your refreshControl whenever you want. Just don't forget to set `translatesAutoresizingMaskIntoConstraints` to `false`.

For example, this code sets the refreshControl in the middle of the screen.

```
let refreshControl = UIRefreshControl()
collectionView.refreshControl = refreshControl
refreshControl.translatesAutoresizingMaskIntoConstraints = false

NSLayoutConstraint(item: refreshControl, attribute: .centerX, relatedBy: .equal, toItem: view, attribute: .centerX, multiplier: 1.0, constant: 0).isActive = true
NSLayoutConstraint(item: refreshControl, attribute: .centerY, relatedBy: .equal, toItem: view, attribute: .centerY, multiplier: 1.0, constant: 0).isActive = true

```
Just simple (Swift)

```
   override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        refreshController.frame = CGRectMake(refreshController.bounds.origin.x,
                                              50.0,
                                              refreshController.bounds.size.width,
                                              refreshController.bounds.size.height);
        refreshController.superview?.sendSubviewToBack(refreshController) // for fix overlap tableview
    }

```