Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-18-2011, 08:20 AM   #1 (permalink)
Registered Member
 
Join Date: Jan 2011
Location: London
Posts: 13
Simo++ is on a distinguished road
Default UITableView delete disclosure help

Hi, just wondering if anyone knows how to determine when the delete icon on an editable UITableView cell has been pressed.

i.e. be notified when the delete button appears in the cell.

I have an working editable table and this is the last thing I need to work out. Cant find info anywhere.

Cheers
Simo++ is offline   Reply With Quote
Old 04-18-2011, 08:37 AM   #2 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

Code:
- (void)tableView:(UITableView *)aTableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
baja_yu is offline   Reply With Quote
Old 04-18-2011, 09:14 AM   #3 (permalink)
Registered Member
 
Join Date: Jan 2011
Location: London
Posts: 13
Simo++ is on a distinguished road
Default

Thanks for the reply, but I have this already, but it is only called when i press the delete button and I need something to notify me when the delete button appears.

Or have I missed something?

Thanks
Simo++ is offline   Reply With Quote
Old 04-18-2011, 09:18 AM   #4 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

You (data source) tells the table for which cells to display the button in:

Code:
- (UITableViewCellEditingStyle)tableView:(UITableView *)aTableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
You can find this and other info in the class reference for UITableViewDataSource.
baja_yu is offline   Reply With Quote
Old 04-18-2011, 10:11 AM   #5 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

Quote:
Originally Posted by Simo++ View Post
when the delete icon on an editable UITableView cell has been pressed.

i.e. be notified when the delete button appears in the cell.
Be specific about your request. The button appearing and the button being pressed are two different things.

UITableViewCell willTransitionToState:
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 04-18-2011, 02:13 PM   #6 (permalink)
Registered Member
 
Join Date: Jan 2011
Location: London
Posts: 13
Simo++ is on a distinguished road
Default

Ok, sorry should have been more clear.

Say you have a UITableView in editing mode and the cells are all showing the '-' icon on the left.

I just want a simple NSLog to fire whenever one is pressed.

Thanks
Simo++ is offline   Reply With Quote
Old 04-18-2011, 02:41 PM   #7 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

I'm not certain about the one on the left. Probably a combination of what I said before and showingDeleteConfirmation.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Reply

Bookmarks

Tags
delete disclosure, delete icon, uitableview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 355
14 members and 341 guests
dansparrow, dre, ilmman, LezB44, lorrettaui53, Nobbsy, Objective Zero, oztemel, pbart, samdanielblr, shagor012, sledzeppelin, thephotographer, Trickphotostudios
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,119
Posts: 402,896
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:47 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0