I have this subview I want to add to my main view, but make it expand from the origin. I read some of the Apple documentation but I don\'t understand where I am making mistake.
Important points
1) Add view to your parentView before animation, with starting frame.
2) Then just give target frame inside animation block
You no longer need this since you are adding view from nib..
//UIVIew yourView = [[UIView alloc] initWithFrame:YOUR_STARTING_FRAME];
//[self.view addSubview:yourView];
.........
.........
.........
just give the animation code on your view.. Make sure yourView is not nil (Seems to me that is the case..)
NSLog(@"yourview : %@",yourView);
[UIView animateWithDuration:your_duration
delay:your_starting_delay
options:UIViewAnimationCurveEaseInOut
animations:^ {
yourView.frame = YOUR_TARGET_FRAME;
}completion:^(BOOL finished) {
}];