[plain]
- (void)loadView { UIImageView *contentView = [[UIImageView alloc] initWithFrame:[[UIScreenmainScreen] applicationFrame]]; [contentView setImage:[UIImage imageNamed:@"subview_9_bg.png"]]; [contentView setUserInteractionEnabled:YES]; self.view = contentView; [contentView release]; } UINavigationBar背景图片可以这样实现: @implementation UINavigationBar (CustomImage) - (void)drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed: @"top_bg.png"]; [image drawInRect:CGRectMake(0, 0, self.frame.size.width,self.frame.size.height)]; } @endiPhone九宫格的实现(2)
内容版权声明:除非注明,否则皆为本站原创文章。