是否可以在UIImageView中仅旋转图像?我正在寻找有关它的信息,但我只找到了旋转UIImageVeiw的信息.
我在Xcode - Single View应用程序中创建了新项目.应用程序只有两个按钮.
UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
[button1 setBackgroundColor:[UIColor greenColor]];
[button1 setFrame:CGRectMake(0, self.view.frame.size.height-40-100, self.view.frame.size.width, 40)];
[button1 setTitle:NSLocalizedString(@"button 1", nil) forState:UIControlStateNormal];
[button1 setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
[button1 setTitleColor:[UIColor blueColor] forState:UIControlStateHighlighted];
[self.view addSubview:button1];
UIButton *button2 = [UIButton buttonWithType:UIButtonTypeCustom];
[button2 setBackgroundColor:[UIColor greenColor]];
[button2 setFrame:CGRectMake(0, self.view.frame.size.height-40, self.view.frame.size.width, 40)];
[button2 setTitle:NSLocalizedString(@"button 2", nil) forState:UIControlStateNormal];
[button2 setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
[button2 setTitleColor:[UIColor blueColor] forState:UIControlStateHighlighted];
[self.view addSubview:button2];
Run Code Online (Sandbox Code Playgroud)
当我在带有iOS 7的iPhone上运行此应用程序时,当我按下此按钮时,第二个按钮会突出显示突出显示状态.在iPhone上使用iOS 6秒按钮非常完美.
为什么iOS 7上的按钮有突出显示的延迟?