可以为纵向和横向设置不同的滚动条大小吗?示例:纵向:x500 y568横向:x568 y320
<标题> Home.h h1>IBOutlet UIScrollView *ScrollerHome;
}
@end
<标题> Home.m h1> li>(void) viewDidLoad {(超级viewDidLoad);
//---------------------------------- 滚动视图的家 ---------------------------------------//[ScrollerHome setScrollEnabled:是的);[ScrollerHome setContentSize:CGSizeMake(815,610)];
}
@end
标题>标题>UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
if (orientation == UIDeviceOrientationPortrait || orientation ==
UIDeviceOrientationPortraitUpsideDown)
{
//portrait
[ScrollerHome setContentSize:CGSizeMake(500, 568)];
}
else if (orientation == UIDeviceOrientationLandscapeLeft || orientation == UIDeviceOrientationLandscapeRight)
{
//landscape
[ScrollerHome setContentSize:CGSizeMake(568, 320)];
}