user1344851
user1344851

Reputation:

group static tableView in storyboard does not appear

In storyboard I create static Group table view contain 4 rows when I add my tableView classes to the storyboard it dosen't show my group cell

would you please help me (I'm new to iOS please show me with code)

Thanks in Advance!

here is the code for tableView Class

#import "CheckedInOut.h"

@interface CheckedInOut ()

@end

@implementation CheckedInOut

 - (void)viewDidLoad
 {
 [super viewDidLoad];

  UIBarButtonItem *menuButton= [[UIBarButtonItem alloc] initWithTitle:@"Menu" style:UIBarButtonItemStyleDone  
 target:self action:@selector(menu:)];

UIBarButtonItem *yearButton= [[UIBarButtonItem alloc] initWithTitle:@"Year" style:UIBarButtonItemStyleDone 
 target:self action:@selector(year:)];

UIBarButtonItem *weekButton= [[UIBarButtonItem alloc] initWithTitle:@"Week" style:UIBarButtonItemStyleDone 
target:self action:@selector(week:)];

UIBarButtonItem *reportButton= [[UIBarButtonItem alloc] initWithTitle:@"Report" style:UIBarButtonItemStyleDone
target:self action:@selector(report:)];


NSArray *buttons = [NSArray arrayWithObjects:menuButton,yearButton,weekButton,reportButton,nil];
self.navigationItem.rightBarButtonItems = buttons;

}

- (void)viewDidUnload
{

  }


 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 4;
}

I don't know what should I write here for return

 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [myArray count];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];


return cell;
}




#pragma mark - Table view delegate

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
// Navigation logic may go here. Create and push another view controller.
}

@end

Upvotes: 1

Views: 903

Answers (1)

Elnaz
Elnaz

Reputation: 1093

you should remove all these 3 if you are using static table in storyboard

 - (NSInteger)tableView:
 - (UITableViewCell *)tableView:
 - (void)tableView:(UITableView *)

Upvotes: 2

Related Questions