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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:33:20+00:00 2026-05-18T05:33:20+00:00

i have a table view, in one condition i want to use an accessory

  • 0

i have a table view, in one condition i want to use an accessory using UITableViewCellAccessoryDetailDisclosureButton, but i want to change that icon with my icon, can i do it??

  • 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-18T05:33:20+00:00Added an answer on May 18, 2026 at 5:33 am

    yes ….you can do it easily by adding custom button…

    1. Create the Custom button,
    2. Setting the image of button
    3. Add this button to accessoryView
    4. Set the method for the button

    I am providing you some help with the Code:

    -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
    
        static NSString *CellIdentifier = @"Cell";
       cell =(Custom *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    
        if (cell == nil) {
            cell = [[[Custom alloc]  initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
            [cell setBackgroundColor:[UIColor clearColor]];
            menuTable.separatorColor =[UIColor clearColor];
    
        }
        UIImage *image = [UIImage imageNamed:@"ButtonClickOrder.png"];
    
        UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
        CGRect frame = CGRectMake(0.0, 0.0, image.size.width, image.size.height);
        button.frame = frame;   // match the button's size with the image size
    
        //[button setBackgroundImage:image forState:UIControlStateNormal];
        [button setImage:image forState:UIControlStateNormal];
        // set the button's target to this table view controller so we can interpret touch events and map that to a NSIndexSet
        [button addTarget:self action:@selector(checkButtonTapped:event:) forControlEvents:UIControlEventTouchUpInside];
        button.backgroundColor = [UIColor clearColor];
        cell.accessoryView = button;
    
           return cell;
    }
    
    //These are the methods which are called with the AccessoryView is Clicked
    
    - (void)checkButtonTapped:(id)sender event:(id)event
    {
    
        NSSet *touches = [event allTouches];
        UITouch *touch = [touches anyObject];
        CGPoint currentTouchPosition = [touch locationInView:menuTable];
        NSIndexPath *indexPath = [menuTable indexPathForRowAtPoint: currentTouchPosition];
        NSLog(@"Section:%d",indexPath.section);
        NSLog(@"Index:%d",indexPath.row);
        if (indexPath != nil)
        {
             [ self tableView: menuTable accessoryButtonTappedForRowWithIndexPath: indexPath];
    
        }
    
    }
    
    - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
    {   
    
            NSLog(@"%d",indexPath.section);
    
    }
    

    Hope this will surely work for u….

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

Sidebar

Related Questions

I have one table view that should be filtered by values of search field
I have one table view within the app that I hope multiple parts of
I have 2 sections within a table view and I have loaded one section
I have a Table View Controller with cells. I want to update the text
I have a table view that I am customizing and I am adding a
I have a table view that is managed by an NSFetchedResultsController. I am having
i have trouble with calling one view controller to another view controller using segue
I'm making a shopping cart. In one tab, I have a table view controller
hello every one i have table view with one cell,and i make on this
I have a table and I want the user to pick how to view

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.