//允许屏幕旋转
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
returnYES;
}
- (NSUInteger)supportedInterfaceOrientations
{
returnUIInterfaceOrientationMaskLandscape;
}
- (id)initWithCoder:(NSCoder*)aDecoder
{
if(self= [superinitWithCoder:aDecoder]) {
self.autoresizesSubviews=UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
self.backgroundColor= [UIColorblackColor];
}
returnself;
}
网友评论