Précédent   Forum du club des développeurs et IT Pro > Systèmes > Mac
Mac Forum d'entraide sur environnement et développement OS X et iOS. Avant de poster : lire la FAQ Mac ; voir la page Outils ; voir les tutoriels.
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 30/01/2013, 10h47   #1
Fooshi
Membre habitué
 
Avatar de Fooshi
 
Homme
Inscription : juin 2002
Messages : 387
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Secteur : High Tech - Multimédia et Internet

Informations forums :
Inscription : juin 2002
Messages : 387
Points : 133
Points : 133
Par défaut Afficher une tableview dans une scrollview

Bonjour,
j'ai une scrollview définie dans un fichier et je voudrais afficher une tableview avec 4 éléments, mais je n'arrive pas a faire apparaitre cette tableview :


Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @"Cell";
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    }
    
    cell.textLabel.text = [NSString stringWithFormat:@"TEXTE ICI"];
    return cell;
}


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


- (void)initIHM{


//ELEMENTS DE LA VUE PRINCIPALE
    scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, wVue, self.view.frame.size.height)];
    scrollView.backgroundColor  = backColor;
    scrollView.scrollEnabled    = YES;
    scrollView.delegate         = self;

UITableView * table = [[UITableView alloc] init];
    [scrollView addSubview:table];
}
est ce que j'ai oublié quelque chose ? comment "remplir" les lignes de ma tableview ?
merci d'avance
Fooshi est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Cette discussion est résolue.
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 15h43.


 
 
 
 
Partenaires

Hébergement Web