141 } |
141 } |
142 |
142 |
143 -(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger) section { |
143 -(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger) section { |
144 if (section == 1) { |
144 if (section == 1) { |
145 UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 240)]; |
145 UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 240)]; |
|
146 footer.autoresizingMask = UIViewAutoresizingFlexibleWidth; |
|
147 |
146 UIImage *img = [[UIImage alloc] initWithContentsOfFile:@"surprise.png"]; |
148 UIImage *img = [[UIImage alloc] initWithContentsOfFile:@"surprise.png"]; |
147 UIImageView *imgView = [[UIImageView alloc] initWithImage:img]; |
149 UIImageView *imgView = [[UIImageView alloc] initWithImage:img]; |
148 [img release]; |
150 [img release]; |
149 imgView.center = CGPointMake(self.tableView.frame.size.width/2, 120); |
151 imgView.center = CGPointMake(self.tableView.frame.size.width/2, 120); |
|
152 imgView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; |
150 [footer addSubview:imgView]; |
153 [footer addSubview:imgView]; |
151 [imgView release]; |
154 [imgView release]; |
152 |
155 |
153 UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 20)]; |
156 UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 20)]; |
|
157 label.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; |
154 label.textAlignment = UITextAlignmentCenter; |
158 label.textAlignment = UITextAlignmentCenter; |
155 label.text = @" ♥ THANK YOU ♥ "; |
159 label.text = @" ♥ THANK YOU ♥ "; |
156 label.backgroundColor = [UIColor clearColor]; |
160 label.backgroundColor = [UIColor clearColor]; |
157 label.center = CGPointMake(self.tableView.frame.size.width/2, 250); |
161 label.center = CGPointMake(self.tableView.frame.size.width/2, 250); |
158 [footer addSubview:label]; |
162 [footer addSubview:label]; |