• After more than 15 years covering everything Apple, it’s with a heavy heart we announce that we will no longer be publishing new content on iMore and the iMore forums will be closing as of November 1st, 2024.

iMore

i was trying to create simple animation,but something is wrong in my code :(
main UIView :
Code:
@interface TouchResponder : UIView {
    IBOutlet UIView *stalker;    
}
@end
i want to display stalker with code. and i am initializing it in TouchResponder's init ;
Code:
@implementation TouchResponder 
- (id)init
{
    self = [super init];
    if (self) {
        CGRect  viewRect = CGRectMake(10, 10, 100, 100);
        stalker = [[UIView alloc] initWithFrame:viewRect];
        [stalker setCenter:CGPointMake(0,0)];
        [stalker setBackgroundColor:[UIColor blueColor]];
    }
    return self;
}
I only want to display that blue rectangle in my main UIView