en essayant d'écrire ce code depuis 2 jours maintenant, mais je continue à obtenir une erreur, ce serait bien si quelqu'un pouvait résoudre ce problème, merci.Très basique vue de la table, mais obtenir des erreurs
Fondamentalement, c'est la même chose que je fais du tutoriel sur youtube.
attente d'une réponse
#import "BooksTableViewController.h"
#import "BooksDetailViewController.h"
#import "MYbooksAppDelegate.h"
@implementation BooksTableViewController
@synthesize BooksArray;
@synthesize BooksDetailViewController;
- (void)viewDidLoad {
[super viewDidLoad];
self.title = NSLocalizedString(@"XYZ",@"GOD is GREAT");
NSMutableArray *array = [[NSArray alloc] initWithObjects:@"H1",@"2",@"3",nil];
self.booksArray = array;
[array release];
}
#pragma mark Table view methods
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [self.booksArray count];
}
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *identity = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identity];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:identity] autorelease];
}
// Set up the cell...
cell.textLabel.text = [booksArray objectAtIndex:indexPath.row];
return cell;
}
// ...various boiler plate methods
@end
(soupir ...) Quelle erreur obtenez-vous? – RickiG
Rien dans le code d'origine ou édité ne semble erroné en supposant que la section brouillée était une erreur de collage. Quelle erreur avez-vous obtenu? Nous ne sommes pas psychiques, vous savez. – TechZen