有两段代码:
代码1:
UIView* _backView = [[[UIView alloc] initWithFrame:[[self view] frame]] autorelease];
[_backView setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"testbg"]]];
[[self tableViewCountrySelector] setBackgroundView:_backView];
代码2:
UIView* _backView = [[[UIView alloc] initWithFrame:[[self view] frame]] autorelease];
[[self tableViewCountrySelector] setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"testbg"]]];
[[self tableViewCountrySelector] setBackgroundView:_backView];
我的问题是:
我只是不明白代码2是如何工作的。