C#.Net > Hello world Iphone

TitreHello world Iphone
Postée le23-01-2012
Affichée84
Mini-lien
Description

Hello world pour application Iphone

EtatNe contient pas d'erreurs. Ne contient pas d'erreurs.
Code d'insertion
Options
Afficher les numéros de lignes  Mettre la source en plein ecran  Selectionner la source  Partager sur Facebook 
Téléchargement Telecharger en format txt  Telecharger en format pdf
Plein ecran
#import "HelloWorldController.h"

@implementation HelloWorldController

@synthesize hwLabel;

(void)loadView
{
        //View
        CGRect mainFrame = [[UIScreen mainScreen] applicationFrame];
        UIView *maView = [[UIView alloc] initWithFrame:mainFrame];

        maView.backgroundColor = [UIColor groupTableViewBackgroundColor];
        self.view = maView;
        [maView release];
       
        // Label
        hwLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, mainFrame.size.width20, 40)];
        [hwLabel setTextColor:[UIColor blackColor]];
       
        hwLabel.backgroundColor = [UIColor clearColor];
        hwLabel.textAlignment = UITextAlignmentCenter;
        hwLabel.text = @"Hello World!!";
        [self.view addSubview:hwLabel];
}