在ios8 中transform布局根据frame布局的,但是在ios9中是根据center布局的,所以在ios9中写法这样子是没问题的
_pv = [[UIPickerView alloc]initWithFrame:CGRectMake(width / 2.0 - height/2.0f, width/2.0-height/2.0f, 75, width)];
_pv.center = CGPointMake(width/2.0f, height/2.0f);
//加入把这句话去掉,在ios8和9中效果不一样的。
_pv.dataSource = self;
_pv.delegate = self;
_pv.layer.anchorPoint = CGPointMake(0.5, 0.5);
_pv.transform = CGAffineTransformMakeRotation(-M_PI/2);