//
//  DetailInventaire.m
//  Axis
//
//  Created by Olivier Savard on 10-03-01.
//  Copyright 2010 OSInfo Informatique. All rights reserved.
//

#import "DetailInventaire.h"


@implementation DetailInventaire
@synthesize image;
@synthesize noPhoto;

/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        // Custom initialization
    }
    return self;
}
*/

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
	NSString* imageURL = [[NSString alloc] initWithFormat:@"http://www.web-k.org/os/imgs/%i.png",self.noPhoto];
	NSData* imageData = [[NSData alloc]initWithContentsOfURL:[NSURL URLWithString:imageURL]];
	UIImage* imageTemp = [[UIImage alloc] initWithData:imageData];
	image.image=imageTemp;
    [super viewDidLoad];
	[imageURL release];
	[imageData release];
	[imageTemp release];
	
}


/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	// Release any retained subviews of the main view.
	// e.g. self.myOutlet = nil;
	self.image = nil;
}


- (void)dealloc {
	[image release];
	[noPhoto release];
    [super dealloc];
}


@end
