0
我有一个应用程序,其中我需要水平翻转UIView(180度)。此UIView也包含UILabel和UIImageView。当我翻转视图时文本和图像模糊
我使用此代码翻转UIView并再次翻转UILabel和UIImageView以避免镜像效果。
-(void)rotateSearchView:(UIView *)searchView{
searchView.layer.transform = CATransform3DMakeRotation(M_PI, 0.0f, 1.0f, 0.0f);
searchView.frame = CGRectIntegral(searchView.frame);
for(UIView *view in searchView.subviews){
view.layer.transform = CATransform3DMakeRotation(M_PI, 0.0f, 1.0f, 0.0f);
view.frame = CGRectIntegral(view.frame);
if([view isKindOfClass:[UITextField class]]){
UITextField *lbl = (UITextField *) view;
[lbl setTextAlignment:NSTextAlignmentRight];
}
}
}
但现在的UIImageView中的UILabel的文本和图像模糊。
任何建议
你为什么触摸searchView子视图? –
搜索视图是由我自定义创建的。 –