Я абсолютный новичок в разработке iOS и мне нужно немного помочь:
У меня есть UIViewController с 2 вложенными TableViews.
(Реализация вроде здесь )
.h файл
#import <UIKit/UIKit.h>
@interface TabAboutViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
}
@property (nonatomic, strong) NSArray *navigationList;
@end
.m файл
#import "TabAboutViewController.h"
@interface TabAboutViewController ()
@end
@implementation TabAboutViewController
#pragma mark -
#pragma mark Synthesize
@synthesize navigationList;
@synthesize informationTableView;
#pragma mark -
#pragma mark View Load
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
navigationList = [NSArray arrayWithObjects:@"Was leistet die App?",@"Wie wird gemessen?",@"Wie wird ausgewertet?",@"Was sind die Vorteile?",nil];
}
#pragma mark -
#pragma mark View UnLoad
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
}
#pragma mark -
#pragma mark View Rotates
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
#pragma mark -
#pragma mark Table Management
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
return [self.navigationList count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"aboutCell"];
NSString *cellText = [self.navigationList objectAtIndex:indexPath.row];
cell.textLabel.text = cellText;
return cell;
}
@end
Теперь я хочу установить цвет фона для одного из TableViews в UIViewController, но я не знаю, как и где это сделать. я не хочу менять это в раскадровке.