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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:52:03+00:00 2026-06-14T18:52:03+00:00

I use UICollectionView to make a small app. I just want to change Edit

  • 0

I use UICollectionView to make a small app.
I just want to change Edit Menu when tap “longPress” but can not.

Ex. Change “Cut” to “Delete”.


I implement my ActionSheet like the code below.
But that’s not I want because I must implement ActionSheetDelegate outside the scope of UICollectionView.

I want to implement ActionSheet inside performAction method for easy to control.
Any suggestion? Thank you!

- (BOOL)collectionView:(QSCollectionView *)collectionView shouldShowMenuForItemAtIndexPath:(NSIndexPath *)indexPath{
    QSCell *cell = [collectionView cellForItemAtIndexPath:indexPath];
    UIActionSheet *deleteButton = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:@"Remove: %@",[collectionView.collectionData objectAtIndex:indexPath.row]] delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"OK" otherButtonTitles: nil];
    [deleteButton showFromRect:CGRectMake(0, 57, 57, 20) inView:cell animated:NO];
    return YES;
}
-(BOOL)collectionView:(QSCollectionView *)collectionView canPerformAction:(SEL)action forItemAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender{
    return YES;
}
-(void)collectionView:(QSCollectionView *)collectionView performAction:(SEL)action forItemAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender{
}
//ActionSheet
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{
    switch (buttonIndex) {
        case 0:
            NSLog(@"Delete");
            break;
        default:
            break;
    }
}
  • 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-14T18:52:04+00:00Added an answer on June 14, 2026 at 6:52 pm

    You should implement your own UIActionSheet class and show that when longPress action is occurred.

    Here is the protocol document for UIActionSheet and the UIActionSheet class reference.

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

Sidebar

Related Questions

Use case: we have some project meta-data files which we want tracked, but are
use C#,want to upload excel file on google doc. bellow syntax use to upload
I a trying to build an application where i can use UICollectionviewcontroller & NSFetchresultcontroller
I want to delete multiple items from my HomeDirectory. I'm using UICollectionView with allowsMultipleSeletion
I cant figureout why my ICollectionView is not refreshed. Can anyone explain what I'm
I found some items regarding this questions on SO, but they do not satisfy
I'm sure this is dead simple, but I can't seem to figure it out.
Use case: I find a piece of code that I do not understand at
use Rack::Session::Pool ... session[:msg]=Hello Rack EDIT: The word session doesn't seem to resolve. I
I recently started playing with the awesome UICollectionView API, making reasonable progress, but have

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.