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 677841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:05:01+00:00 2026-05-14T01:05:01+00:00

I have the following code: visitSite.hidden = YES; For some reason, when I click

  • 0

I have the following code:

visitSite.hidden = YES;

For some reason, when I click a UIButton and call this piece of code, the visitSite button does not hide.

The code is within this block:

-(IBAction)welcomeButtonPressed:(id)sender {
  [UIButton beginAnimations:@"welcomeAnimation" context:NULL];
  [UIButton setAnimationDuration:1.5];
  [UIButton SetAnimationDidStopSelector:@selector(nowHideThisSiteButton:finished:context:)];
  [UIButton setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES];
  ((UIView *)sender).hidden = YES;
  [UIButton commitAnimations];
}

and the stop selector below:

-(void)nowHideThisSiteButton:(NSString *)animationID finished:(BOOL *)finished context:(void *)context {
  visitSite.hidden = YES;
}

I’ve also tried [visitSite setHidden:YES]; and that fails as well. ALSO I’ve noticed that the setAnimationDidStopSelector does not get called at all.

Also, visitSite (when NSLogged) equals:

<UIButton: 0x1290f0; frame = (0 0; 320 460); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x1290f0>>

visitSite.hidden (when NSLogged) equals: NULL

Any more ideas? 🙁

  • 1 1 Answer
  • 1 View
  • 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-05-14T01:05:01+00:00Added an answer on May 14, 2026 at 1:05 am

    There are a few mistakes in your code.

    1. The hidden property of UIView is NOT animatable. When this animation block runs, your button will vanish, but it will not fade/animate. The appropriate way to fade out a UIView is to animate its alpha property from 1.0 to 0.0 like this:

      myView.alpha = 1.0;
      [UIView beginAnimations:@”Fade” context:NULL];
      myView.alpha = 0.0;
      [UIView commitAnimations];

      Here is a list of animatable UIView properties

    2. setAnimationDidStopSelector does not get called because you have not set the animation delegate. You have properly specified a didStopSelector, which tells the UIView class what message to send when animation is complete. However, you haven’t specified what to send this message to. The animation block has no idea about your object. Just add this line inside the animation block:

      [UIView setAnimationDelegate:self];

      (Replace self with whatever object you want to receive the didStopSelector)

    3. As others has stated, your button is nil because it hasn’t been hooked up properly in Interface Builder. In your .h file, you should have @property (nonatomic, retain) IBOutlet UIButton * visitSite;. Then in Interface Builder, click your controller, switch to the Connections display, and drag the open circle thing over to your button. That should do it. See the Interface Builder help guide for more info on that.

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

Sidebar

Ask A Question

Stats

  • Questions 354k
  • Answers 354k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You need to do this through VBScript and load in… May 14, 2026 at 7:52 am
  • Editorial Team
    Editorial Team added an answer EDIT: I tried to clarify I bit more ... 1.… May 14, 2026 at 7:52 am
  • Editorial Team
    Editorial Team added an answer Read each line, stick the contents of the line into… May 14, 2026 at 7:52 am

Related Questions

I have the following code in a web.config file of the default IIS site.
I have the following code: $bind = new COM(LDAP://CN=GroupName,OU=Groups,OU=Division,DC=company,DC=local); When I execute it from
I have the following code snippet. $items['A'] = Test; $items['B'] = Test; $items['C'] =
I have the following code: SELECT <column>, count(*) FROM <table> GROUP BY <column> HAVING
I have the following code: String inputFile = somefile.txt; FileInputStream in = new FileInputStream(inputFile);

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.