Good, I know how to hide a tableview after a comparison, try this but it did not.
Code:
self.tablaCyRs.hidden = YES;
Code complete.
viewController.h
Code:
@interface CyRsViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
IBOutlet UITableView *tablaCyRs;
.
.
}
viewController.m
Code:
#pragma mark - View lifecycle
- (void)viewDidLoad
{
[super viewDidLoad];
if(!error){
} else{
self.tablaCyRs.hidden = YES; // this line
}
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
#pragma mark - Metodos del TablaView
/*TODO: Numero de Secciones de la tabla.*/
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
/*TODO: Numero de Filas por tabla.*/
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [cyrs count];
}
/*TODO: Titulo de cabecera de cada seccion.*/
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
return @"";
}
/*TODO: Creacion de las secciones de la tabla.*/
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
//inicialiacion de la Tabla
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
//verifica si la celda esta inicializada
if (cell == nil) {
//Inicializa Celda
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];
//Cambia de color a las separaciones de la tabla
}else{
// etc
}
if(indexPath.row == 0){
//etc
}else{
// etc
}
return cell;
}
how could I do to see the tableview not even able to put a alertview. thanks