i was trying to create simple animation,but something is wrong in my code
main UIView :
i want to display stalker with code. and i am initializing it in TouchResponder's init ;
I only want to display that blue rectangle in my main UIView
main UIView :
Code:
@interface TouchResponder : UIView {
IBOutlet UIView *stalker;
}
@end
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;
}