Page 1 of 1 [ 1 post ] 

Madbones
Veteran
Veteran

User avatar

Joined: 7 Mar 2010
Age: 23
Gender: Male
Posts: 777
Location: In the zone

22 May 2011, 10:24 am

Is this the worlds biggest fail in Objective C made by me?
Or is this just Apple trying to get me to waste another 2 gbs worth of bandwidth?

Whats wrong with this?
Test101ViewController.h:
#import "UIKit/UIKit.h"
#import "Foundation/Foundation.h"
@interface Test101ViewContorller : UIViewController{
IBOutlet UILabel * labelTest;

}
@property (nonatomic,retain) UILabel * labelTest;

-(IBAction) testButton;

@end

Test101ViewController.m:

#import "Test101ViewController.h"
@implementation Test101ViewController
@synthesize labelTest;

-(void) viewDidLoad{

[super viewDidLoad];
}

-(IBAction) testButton{
labelTest.text = "Hey this is a test";

}

-(void) dealloc{
[release labelTest];
[super dealloc];
}
@end
Just randomly coded that yesterday for some reason.
But thats not the point.
It says that I did not declare Label test which i most certinly did.
This might be me (I cannot think straight today) is there anything wrong with this code?
Also:
When I go to make an XIB it does not make the XIbs .h and .m files why is this?