0

I'm trying to extend my UITableView or UIView 's height by clicking a button to show more details in it as same as the option in the App Store when you want to see more updates of the app. Is it any tutorial for that ?

1 Answer 1

0

ok I'm gonna answer my own question. probably there is a easier way for this but if someone has the same question u can use this : 1. Add a UIButton on the view 2. In the .h file make a NSInteger i and in the viewDidLoad give i=0. 3. When user click the invisible button on the UIView :

-(IBAction) clickMyView (id) sender {
if (i==0){
i=1;
[self changeView];
}
else{
i=0;
[self changeView];
}

4.Set chageView:

-(void) changeView{
if (i==0){
        [UIView beginAnimations : nil context:nil];
        [UIView setAnimationDuration:0.3];
        [UIView setAnimationBeginsFromCurrentState:TRUE];        

        // Change the view back to it's normal size here
        [UIView commitAnimations];

}
else{
            [UIView beginAnimations : nil context:nil];
            [UIView setAnimationDuration:0.3];
            [UIView setAnimationBeginsFromCurrentState:TRUE];

            // Change the view to the new size here
            [UIView commitAnimations];

}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.