需要在fixedview上添加兩個(gè)Label,文字相同只有方向不同
directionPromptLabel1豎直方向
directionPromptLabel2橫屏方向
將定義好的directionPromptLabel1賦值給temp然后再做修改
解決方法:將directionPromptLabel1 90度反轉(zhuǎn)之后再定位
//底層view
UIView *fixedview = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREENWIDTHTT, SCREENHEIGHT - 80-22)];
UILabel directionPromptLabel1 = [[UILabel alloc]initWithFrame:CGRectMake(0,SCREENHEIGHTTT -124, SCREENWIDTH, 20)];
directionPromptLabel1.text = NSLocalizedString(@"添加無(wú)發(fā)票明細(xì) >", nil);
directionPromptLabel1.textAlignment = NSTextAlignmentCenter;
directionPromptLabel2 = [[UILabel alloc]initWithFrame:CGRectMake(0,SCREENHEIGHTTT -124, SCREENWIDTH, 20)];
directionPromptLabel2.text = NSLocalizedString(@"添加無(wú)發(fā)票明細(xì) >", nil);
directionPromptLabel2.textAlignment = NSTextAlignmentCenter;
directionPromptLabel2.transform = CGAffineTransformMakeRotation(M_PI/2);
directionPromptLabel2.leftL = 30;
directionPromptLabel2.numberOfLines = 0;
directionPromptLabel2.centerY = fixedview.centerY;
directionPromptLabel2.textColor = [UIColor whiteColor];
directionPromptLabel1.textColor = [UIColor whiteColor];
[fixedview addSubview:directionPromptLabel1];
[fixedview addSubview:directionPromptLabel2];