Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8656583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:18:43+00:00 2026-06-12T15:18:43+00:00

I want a button to trigger the following action. When clicked it’s supposed to

  • 0

I want a button to trigger the following action. When clicked it’s supposed to push my logo up and out of the view and remove it. When it’s clicked once more it’s supposed to do the reverse thing. Meaning the image is created and pushed down back into the view. I’m using storyboard to set up my interface. My issue is that I can’t get the animation to trigger. Posting my code below:

In TableViewController.h

@interface TableViewController : UITableViewController{

    BOOL status;

}

@property (weak, nonatomic) IBOutlet UIImageView *animateLogo;
@property (weak, nonatomic) IBOutlet UIButton *button;

- (IBAction)onClick:(id)sender;
- (void)showHideView;

@end

In TableViewController.m

@synthesize animateLogo, button;

- (void)viewDidLoad{

    [super viewDidLoad];

    status = YES;

}

- (IBAction)onClick:(id)sender{
[self showHideView];
}

if(status){

    [UIView
     animateWithDuration:1.5
     delay:0
     options:UIViewAnimationCurveEaseOut
     animations:^{
         [animateLogo setFrame:CGRectOffset([animateLogo frame], 0, -animateLogo.frame.size.height)];
     }
     completion:^(BOOL completed) {}
    ];

    status = NO;
    [button setTitle:@"Show" forState:UIControlStateNormal];

}
else{

    [UIView
     animateWithDuration:1.5
     delay:0
     options:UIViewAnimationCurveEaseOut
     animations:^{
         [animateLogo setFrame:CGRectOffset([animateLogo frame], 0, animateLogo.frame.size.height)];
     }
     completion:^(BOOL completed) {}
    ];

    status = YES;
    [button setTitle:@"Hide" forState:UIControlStateNormal];

}

}

EDIT:

The animation is working if I programmatically code the UIImageView. So the issue is with the storyboard somehow. I prefer to get this working with storyboard so I can get a better overlook on the layout.

UIImage *test = [UIImage imageNamed:@"logo.png"];
    animateLogo = [[UIImageView alloc] initWithImage:test];
    [self.view addSubview:animateLogo];
    [animateLogo setFrame:CGRectOffset([animateLogo frame], 0, animateLogo.frame.size.height)];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:18:44+00:00Added an answer on June 12, 2026 at 3:18 pm

    Problem sovled. I used a different approach were I animated the UIView instead of the UIImageView. I’s now working like a charm.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to trigger the Controller Action when I click on a button, and
I want to trigger an event with a button that changes the visibility of
I want to trigger on click of a button this: <asp:Button runat=server ID=submit Text=Submit
I want to use some kind of trigger to change a button in my
Button onTouchLitsener does not change when clicked. I want the button to change when
I want the submit button to disappear after it's clicked and a new layer
I have created a Button with the following trigger: <Button Content=Test> <i:Interaction.Triggers> <i:EventTrigger EventName=Click>
I'm stuck figuring out the best practice... I want to create a following system
I've spent almost 3 hours for the following case: I want to trigger an
I want to trigger a function when the submit button is pressed on the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.