summaryrefslogtreecommitdiffstats
path: root/Classes/SearchViewController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Classes/SearchViewController.m')
-rw-r--r--Classes/SearchViewController.m47
1 files changed, 44 insertions, 3 deletions
diff --git a/Classes/SearchViewController.m b/Classes/SearchViewController.m
index 8272dd9..e4718be 100644
--- a/Classes/SearchViewController.m
+++ b/Classes/SearchViewController.m
@@ -17,6 +17,14 @@
- (void)viewDidLoad {
[super viewDidLoad];
+ [self.navigationController.navigationBar drawLogo];
+
+ UIView *backgroundView = [[UIView alloc] initWithFrame:self.view.frame];
+ backgroundView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"backgroundGradient.png"]];
+
+ self.tableView.backgroundView = backgroundView;
+ self.tableView.backgroundColor = [UIColor clearColor];
+
[self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleSingleLine];
[self.tableView setSeparatorColor:[UIColor colorWithRed:0.9 green:0.9 blue:0.9 alpha:1.0]];
@@ -132,16 +140,49 @@
#pragma mark -
#pragma mark uitableviewcontroller protocol
+- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
+{
+ // create the parent view that will hold header Label
+ UIView* customView = [[UIView alloc] initWithFrame:CGRectMake(10.0, 0.0, 300.0, 44.0)];
+
+ // create the button object
+ UILabel * headerLabel = [[UILabel alloc] initWithFrame:CGRectZero];
+ headerLabel.backgroundColor = [UIColor clearColor];
+ headerLabel.opaque = NO;
+ headerLabel.textColor = [UIColor orangeColor];
+ headerLabel.highlightedTextColor = [UIColor whiteColor];
+ headerLabel.font = [UIFont boldSystemFontOfSize:20];
+ headerLabel.frame = CGRectMake(10.0, 0.0, 300.0, 44.0);
+
+ // If you want to align the header text as centered
+ // headerLabel.frame = CGRectMake(150.0, 0.0, 300.0, 44.0);
+
+ headerLabel.text = @"tamper proof cap"; // i.e. array element
+ [customView addSubview:headerLabel];
+
+ return customView;
+}
+
+- (CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
+{
+ return 44.0;
+}
+
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
- return 10;
+ return 3;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return 5;
+ return 3;
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
- return @"tamper proof cap";
+ if (section == 0)
+ return @"Feeds";
+ else if (section == 1)
+ return @"Sets";
+ else
+ return @"Photos";
}
//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath