I'm new to x-code and I am trying to set the x,y position of a UILabel but I can't figure out why it is not working.
.h
@interface ViewController:UIViewController{
IBOutlet UILabel *badgeslabel;
}
@property (nonatomic,retain)IBOutlet UILabel *badgeslabel;
@end
.m
@implementation ViewController
@synthesize badgeslabel;
-(void)setBadge{
[badgeslabel setAlpha:.5];
[badgeslabel setCenter:CGPointMake(160,30)];
}
The setAlpha works, but the setCenter don't. Also, when I put the code in an IBAction the setCenter works but I don't know why. I'm on xcode 5.0 Any help is appreciated, thank you.