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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:29:21+00:00 2026-05-23T11:29:21+00:00

I have got following code for putting rightbarbuttonitem UIButton* rightbutton = [UIButton buttonWithType:UIButtonTypeCustom]; [rightbutton

  • 0

I have got following code for putting rightbarbuttonitem

UIButton* rightbutton = [UIButton buttonWithType:UIButtonTypeCustom];
    [rightbutton setBackgroundImage:[UIImage imageNamed:@"share-icon.png"] forState:UIControlStateNormal];
    [rightbutton addTarget:self action:@selector(share:) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithCustomView:rightbutton] autorelease];

But it is not displaying any barbuttonitem. Instead if I use following code then barbutton item appears but problem is i cant set touch event with this code on barbuttonitem.

UIImageView *iconView=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"dashboard-icon.png"]];
    UIBarButtonItem *icon = [[UIBarButtonItem alloc] initWithCustomView:iconView];
    self.navigationItem.leftBarButtonItem=icon;
    [icon release];
    [iconView release];
  • 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-23T11:29:22+00:00Added an answer on May 23, 2026 at 11:29 am

    Have you tried to set an appropriate frame for the rightbutton? e.g. rightbutton.frame = (CGRect){CGPointZero, image.size};

    Also note:

    On iOS 4 and later, the name of the
    file is not required to specify the
    filename extension. Prior to iOS 4,
    you must specify the filename
    extension.

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

Sidebar

Related Questions

I have got the following code from here to read an Excel file using
I have got the following very simple code: function init() { var articleTabs =
I have the following code and got myself confused: I have a query that
I've got code similar to the following... <p><label>Do you have buffet facilities?</label> <asp:RadioButtonList ID=blnBuffetMealFacilities:chk
I have got following code: I have a enum: public enum HardwareInterfaceType { Gpib
I have got the following code #include <iostream> #include <string> template <typename T> class
I have got following code witch are sending xml file on HTTP protocol and
I have got the following code in a button on a form, but I
I have got the following code to draw a filled circle in opengl. The
I have got the following code for ... if in textbox1 the would be

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.