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

  • SEARCH
  • Home
  • 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 997811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:05:41+00:00 2026-05-16T07:05:41+00:00

I am going to end up with an array of RSS feeds, and would

  • 0

I am going to end up with an array of RSS feeds, and would like a label or some such to display them at the bottom of the view. I would like to animate through each feed in the array.

This is what i have so far to animate, which, works for the fade, but only animates the last item of the array.

feed = [[UILabel alloc] initWithFrame:CGRectMake(0,380,320,43)];
[self.view addSubview:feed];

feed.alpha=1;

NSArray *feeds = [NSArray arrayWithObjects:[NSString stringWithFormat:@"1234567"],[NSString stringWithFormat:@"qwerty"],[NSString stringWithFormat:@"asdfgh"],nil];

for (NSString* f in feeds){

    feed.text=f;

    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
    [UIView setAnimationDuration:2.0f];
    feed.alpha=0;
    [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
    [UIView commitAnimations];

}

Im sure its simple.

Thanks

  • 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-05-16T07:05:42+00:00Added an answer on May 16, 2026 at 7:05 am

    First off you should really consider a better naming convention. Calling a UILabel a feed isn’t very helpful for the future when you have to come back and look at your code. I would name it feedLabel. Then when you iterate through your list of feeds, you can just for (NSString *feed in feeds) and it will make more sense. And so will feedLabel.text = feed;.

    Anyhow, the issue I see with your code is that your are repeatedly setting the alpha to zero in your loop, but you never set it back to one. In other words, you’re not making a change to the alpha value. It stays the same in every iteration.

    So maybe you could clarify what you’re trying to do. If you want to fade the text between changes in the text, you’ll need a different animation and methodology. Instead of a loop, chain your animations such that when your didStopSelector, you set the text and start the next one. Something like:

    - (void)performAnimation;
    {
      [UIView beginAnimations:nil context:NULL];
      [UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
      [UIView setAnimationDuration:2.0f];
      feed.alpha=0;
      [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:)];
      [UIView commitAnimations];
    }
    
    - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag
    {
      feed.alpha = 1.0;
      NSString *nextFeed = [self getNextFeed]; // Need to implement getNextFeed
      if (nextFeed)
      {
        // Only continue if there is a next feed.
        [feed setText:nextFeed];
        [self performAnimation];
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Going through some of my older Delphi projects and upgrading them to D2009, as
I have created an array of pointers. I have used some of them as
I would like to maintain a pidlist array of children I have forked and
In my OpenCL program, I am going to end up with 60+ global memory
Good-morning one and all! This is going to end up being one of those
I have these array in javascript that is going to be the input data
I have an array: var bar = []; I have a for loop going
I have a foreach loop going that is adding e-mail address to an array.
I've got this going: def split_array(array,size) index = 0 results = [] if size
Well this is going to sound like a lame question, I know. This is

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.