读书人

UIView背景图固定不滚动兑现

发布时间: 2012-06-26 10:04:13 作者: rapoo

UIView背景图固定不滚动实现

?

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];    if (self) {self.title = @"比分";UIBarButtonItem *reloadItem = [[UIBarButtonItem alloc] initWithTitle:@"重新加载" style:UIBarButtonItemStylePlain target:self action:@selector(reloadItem_click:)];self.navigationItem.rightBarButtonItem = reloadItem;self.back = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"back.png"]];self.back.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);[self.view addSubview:self.back];self.mainView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];self.mainView.backgroundColor = [UIColor clearColor];[self.view addSubview:self.mainView];    }    return self;}
?

UIView背景图固定不滚动兑现

读书人网 >移动开发

热点推荐