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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:51:32+00:00 2026-06-17T06:51:32+00:00

The following attempts to make a navigation button and animate it, however I think

  • 0

The following attempts to make a navigation button and animate it, however I think I am missing something.

Please let me know where I went wrong.

Thank you!
This is in a custom UINavigationItem class

-(void)awakeFromNib{
    [super awakeFromNib];
    UIImage *myimage = [UIImage imageNamed:@"navBarFilter.png"];
    NSArray * imageArray  = [[NSArray alloc] initWithObjects:
                             [UIImage imageNamed:@"navBarFilter.png"],
                             [UIImage imageNamed:@"navBarFilter1.png"],
                             [UIImage imageNamed:@"navBarFilter2.png"],
                             [UIImage imageNamed:@"navBarFilter3.png"],
                             [UIImage imageNamed:@"navBarFilter4.png"],
                             [UIImage imageNamed:@"navBarFilter5.png"],
                             nil];

    CGRect frameimg = CGRectMake(0, 0, myimage.size.width, myimage.size.height);

    UIButton *someButton = [[UIButton alloc] initWithFrame:frameimg];
    [someButton setBackgroundImage:myimage forState:UIControlStateNormal];

    UIBarButtonItem *filterButton =[[UIBarButtonItem alloc] initWithCustomView:someButton];

    someButton.imageView.animationImages =imageArray;
    someButton.imageView.animationDuration=2.0;
    someButton.imageView.contentMode=UIViewContentModeBottomLeft;

    [someButton.imageView startAnimating];

    self.rightBarButtonItem =filterButton;
}
  • 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-17T06:51:33+00:00Added an answer on June 17, 2026 at 6:51 am

    figured it out:

    -(void)awakeFromNib{
        [super awakeFromNib];
    
        NSArray * imageArray  = [[NSArray alloc] initWithObjects:
                                 [UIImage imageNamed:@"navBarFilter.png"],
                             [UIImage imageNamed:@"navBarFilter1.png"],
                             [UIImage imageNamed:@"navBarFilter2.png"],
                             [UIImage imageNamed:@"navBarFilter3.png"],
                             [UIImage imageNamed:@"navBarFilter4.png"],
                             [UIImage imageNamed:@"navBarFilter5.png"],
                             nil];
        UIImageView *imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"navBarFilter.png"]];
    
        imageView.animationImages =imageArray;
        imageView.animationDuration=1.5;
    
        UIButton *someButton = [UIButton buttonWithType:UIButtonTypeCustom];
        someButton.bounds=imageView.bounds;
        [someButton addSubview:imageView];
    
        UIBarButtonItem *filterButton =[[UIBarButtonItem alloc] initWithCustomView:someButton];
    
    
        self.rightBarButtonItem =filterButton;
        [imageView startAnimating];
    
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using the following CSS, I'm trying to make a navigation bar at the top
Following snippet attempts to write the name of directories and files present in some
The following code snippet attempts to create a Tib DaemonManager connecting to a particular
My attempts at enabling SessionState are failing :-( I've added the following page directive
It's a simple task, but I can't make it work. Given the following XML:
I get the following error when my program attempts to connect to a URL
I need to make 3 groups out of the following text: [startA] this is
In my attempts to make libc++ and its tests work on Windows, I have
So I am having some real difficulty figuring out how to make the following
I've run into a particularly nasty bug where an ASP.NET website attempts to make

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.