You can do this by adding subView in viewDidLoad
method of view and in the viewDidAppear
method you can use the animation using block statement to give it some animation.
Happy Coding :)
EDIT 1
Here I have add scrollView in XIB attach the IBOutlate
to it. You can programmatically add it to in the viewDidLoad
method.
At the first I make the View hidden by applying this frame
subCatScroll.frame = CGRectMake(320, 0, 91, 436);
and on some button click I show it through animation (it is coming from right side edge of iPhone)
- (IBAction)done:(id)sender
{
[Appirater userDidSignificantEvent:YES];
if(pointer.hidden == YES)
{
[UIView beginAnimations:@"Move Me To Unhide" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationDuration:kAnimationDur];
subCatScroll.frame = CGRectMake(229,0,91,436);
[UIView setAnimationDelegate:self];
[UIView commitAnimations];
[self configureView];
pointer.hidden = NO;
}
else
{
[UIView beginAnimations:@"Move Me To Hide" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationDuration:kAnimationDur];
subCatScroll.frame = CGRectMake(320, 0, 91, 436);
[UIView setAnimationDelegate:self];
[UIView commitAnimations];
pointer.hidden = YES;
}
}
Here the pointer
is one control which is used to decide what to do with scrollView