Reload subview with animation

102 views Asked by At

I want to reload a scroll view on click of a button.I also need to create animation similar to pushing a new view while reloading the scroll view with new values. Any ideas ?

Updated :

I have a main class in which i call another viewcontroller :

  • (void)viewDidLoad {
    [super viewDidLoad];
    controller = [[abc alloc]initWithNibName:@"abc" bundle:nil];
    [self displayContentController:controller];
    }

  • (void) displayContentController: (UIViewController*) content;{
    [self addChildViewController:content];
    content.view.frame = CGRectMake(0,20, 320, 1048);
    [self.view addSubview:content.view];
    [content didMoveToParentViewController:self];
    }

A button is added to this child view. I want to create a new object of child view and reload that view to the main view on button click. Is it possible !

1

There are 1 answers

0
Adarkas2302 On

If you want to reload the data from a table view then you can do this with the method (void)reloadSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation with this you can do a reload with an animation. For the animations possible look in the Apple Developer Documentation.

If that does not help you, you need to rework your question.