0
iil7을 회전시키고 싶습니다. iOS7 및 iOS8에서 다르게 보입니다. 왜 그 이유를 설명 할 수 있습니까?iOS7 및 iOS8에서 다른 autolayout에서 UILabel로 변환
가 여기 내 데모 코드, 자동 레이아웃 설정 pureLayout를 사용
UIView *view = [UIView newAutoLayoutView];
[self.view addSubview:view];
[view autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:20];
[view autoAlignAxisToSuperviewAxis:ALAxisVertical];
[view autoSetDimensionsToSize:CGSizeMake(20, 100)];
view.backgroundColor = [UIColor lightGrayColor];
UILabel *topLabel = [UILabel newAutoLayoutView];
[view addSubview:topLabel];
topLabel.backgroundColor = [UIColor redColor];
topLabel.text = @"The top label text";
[topLabel autoPinEdgesToSuperviewEdgesWithInsets:UIEdgeInsetsZero excludingEdge:ALEdgeBottom];
CGAffineTransform tran = CGAffineTransformMakeRotation(-M_PI_2);
topLabel.transform = tran;
및 topLabel의 프레임 : iOS7에의
iOS8:{{-1.25, 1.25}, {22.5, 20}}
iOS7:{{0, 0}, {20, 135}}
결과 내가 원하는 것입니다. 그리고 내가 IB를 사용하여 같은 결과는