iPhone屏幕旋转的例子
2010-11-05 00:53:50 来源:WEB开发网// Custom initialization
}
return self;
}
*/
/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/
/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
}
*/
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
- (void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration
{
if (interfaceOrientation==UIInterfaceOrientationPortrait || interfaceOrientation==UIInterfaceOrientationPortraitUpsideDown) {
button1.frame=CGRectMake(20, 20, 125, 125);
button2.frame=CGRectMake(175, 20, 125, 125);
button3.frame=CGRectMake(20, 168, 125, 125);
button4.frame=CGRectMake(175, 168, 125, 125);
button5.frame=CGRectMake(20, 315, 125, 125);
button6.frame=CGRectMake(175, 315, 125, 125);
}else {
button1.frame=CGRectMake(20, 20, 125, 125);
button2.frame=CGRectMake(20, 155, 125, 125);
button3.frame=CGRectMake(177, 20, 125, 125);
button4.frame=CGRectMake(177, 155, 125, 125);
button5.frame=CGRectMake(328, 20, 125, 125);
button6.frame=CGRectMake(328, 155, 125, 125);
}
}
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
- ››iphone图片拉伸的几种方法
- ››iphone正则表达式的简单使用
- ››iPhone开发Unresolved Symbols CAKeyframeAnimati...
- ››IPhone开发-“此证书是由未知颁发机构签名”解决方...
- ››IPhone开发-整合私钥和证书,生成.p12文件
- ››iPhone应用开发-UIPickerView选取器详解
- ››iphone 获取屏幕的宽度和高度
- ››iPhone读取工程包中的二进制文件
- ››iPhone新手机 不挂YouTube APP
- ››iPhone 获取指定格式的时间和日期
- ››iPhone版PPS走进生活 观赏体验媲美PC版
- ››iPhone两种不同的应用程序:两种方法的哲学思想
更多精彩
赞助商链接