I am trying to add an image in a UIView and then add it as a subview on a UIViewController .. here is my code:
Blowview.h
BlowView.m
#import "BlowView.h" @implementation BlowView @synthesize stone; - (id)init { UIImageView *logoView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Placard.png"]]; stone = logoView; [logoView release]; UIImage *img = [UIImage imageNamed:@"Placard.png"]; CGRect frame = CGRectMake(0, 0, img.size.width, img.size.height); [self initWithFrame:frame]; return self; } - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if(self) { } return self; } - (void)dealloc { [stone release]; [super dealloc]; } @end
BlowViewController.h
@class BlowView; @interface BlowViewController : UIViewController { BlowView *aview; } @property (nonatomic, retain) BlowView *aview; -(void)setUpView; @end
BlowViewController.m
#import "BlowViewController.h" #import "BlowView.h" @implementation BlowViewController @synthesize aview; - (void)setUpView {
can't understand where i'm wrong. I do not get any errors. All I get is pure white. Any help would be greatly appreciated :)
source share