scheinem / mscmoreoptiontableviewcell Goto Github PK
View Code? Open in Web Editor NEWDrop-in solution to achieve the "More" button in an UITableView's "Swipe to Delete" menu (as seen in Mail.app under iOS 7)
License: MIT License
Drop-in solution to achieve the "More" button in an UITableView's "Swipe to Delete" menu (as seen in Mail.app under iOS 7)
License: MIT License
Haven't had much time to see what's actually happening here, but when I set tableView.allowsMultipleSelectionDuringEditing = YES;
in iOS7, MSCMoreOptionTableViewCell no longer allows 'swiping'. Continues to work just fine in iOS8 and seemingly iOS9.
You're using private API here (UITableViewCellDeleteConfirmationView, UITableViewCellScrollView) ... nothing against that if you make it robust and prepare for iOS8 where this might break, but you should obfuscate those strings, else you might get rejected.
Hi There,
Just a quick heads up, the more button is taller than the delete button. A fix would be pretty good! Thanks once again!
Have anyone recognise that the more option text position is slightly (maybe by 1 or .5 point) higher then the text position of the delete button?
In Mail.app the internal scrollview bounces when revealing the buttons.
Great project, but it will be greater if we can use it with cocoapods ;)
This code works fine:
[tableView setEditing:NO animated:YES];
This doesn't work when using a custom table view cell.
I've added all the files properly (header search path etc).
The custom tableviewcell inherits from MSCMoreOptionTableViewCell.
The delegate is set properly on the cellForRowAtIndexPatha and the TVC inherits the delegate for MCMoreOptionTableViewCell
Here's the code:
(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
TaskCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
// Configure the cell...
[self configureCell:cell forRowAtIndexPath:indexPath];
cell.delegate = self;
return cell;
}
(void)configureCell:(TaskCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
Task *task = [self.fetchedResultsController objectAtIndexPath:indexPath];
cell.titleLabel.text = task.taskname;
cell.dayLabel.text = [self.dateFormatter stringFromDate:task.duedate];
cell.dayHeaderLabel.text = [self.dateFormatter2 stringFromDate:task.duedate];
cell.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0);
cell.detailsLabel.text = [NSString stringWithFormat:@"%@", task.inSubject.name];
cell.headerImage.image = [self applyColor:[self colorForStringColor:task.inSubject.color] toImage:[UIImage imageNamed:@"header.png"]];
cell.dayLabel.textColor = [self colorForStringColor:task.inSubject.color];
}
@interface TaskCell : MSCMoreOptionTableViewCell
Any clues?
A demo would be nice!
In the demo you have turned off selection completely. Turning it on seems to work, but not like in the Mail app.
In Mail if you reveal the buttons on a selected cell and then hide the buttons the selection remains. In your demo the selection is lost.
I've got some circumstances where I don't want to allow a cell to be deleted or have the more option button appear - e.g. don't allow user to swipe at all. Any way to accomplish this?
can support multi swipe at one time, and click exclude buttons, dismiss all swipestate cell to normal state.
the effect is like QQ
Only the delete button appears on iOS8. I haven't investigated the issue but I'm just noting it here so hopefully we can get an update.
Something is probably missing (libMSCMoreOptionTableViewCell.a)
Hello, I am new to developing for ios and am struggling to integrate its solution with my project. I wonder if there is any example implementation you know. Thank you
Any chance to get it working with iOS 6 ?
Tnx
Roberto
Hi, I'm having an issue where after I slide a row then hit delete, I remove the record from datasource and call reloadData on the tableview. The row disappears however in the row that was below it the moreOption scroll view has scrolled left by a couple of pixels. This means another row cannot be scrolled left until I scroll the tableView up or down slightly and the cell's offset is reset.
Has anyone else had this issue?
Hi, I want to add an edit button to the confirmation view, after clicking the edit button, I want the confirmation view to hide (revert to the original cell state). Is that possible?
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.