Subscribe ( )

iPhone Programming Tutorials

 

Forum

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

You must be logged in to post Login Register

Search 

Joint control in a table cell

User Post

8:44 am
September 30, 2008


gnx

Noob

posts 2

1

Hello everyone, 

I am new to iPhone programming, and have found this great site. It is a great resource. Brandon's tutorials have been praised all over the comments and the forum, and I would like to join everyone in congratulating Brandon for the excellent work!


What I would like to achieve is the following:

Have table cells react to touches in two (well, more than one) different ways. For example, when I click on the right side, it would change an attribute value, but when clicking on the left side it would switch views.

For example, in the ToDo application, I would like to add the ability to check-mark the todo's in the main view on the right side, toggling their status, while pressing on the rest of the line will switch to the todo item view.


I have gone through the Apple docs on Cell Accessories and accessories view, but I am kind of lost. The default accessories provided seem to take over the full control (in my code). How do I restrict the area in which they become active?

Thanks in advance!

2:44 pm
October 7, 2008


joemc91

Noob

posts 2

2

You would have to programatically create a view for the accessory.  Instead of assigning with the method cell.accessoryType = UITableCellViewAcce…, you would create a view and assign it to the accessory as such: cell.accessoryView = checkMarkView.  Then you could use the accessoryButtonTappedForRowWithIndexPath to check the box in that view and the didSelectRowAtIndexPath to change the views.

12:10 am
October 8, 2008


gnx

Noob

posts 2

3

Thanks a bunch! 


About the iCodeBlog forum

Currently Online:

4 Guests

Maximum Online: 44

Forums:

Groups: 2

Forums: 6

Topics: 320

Posts: 760

Members:

There are 680 members

There are 1 guests


Brandon has made 87 posts

Top Posters:

bobcubsfan - 54

crazyiez - 30

VertigoSol - 26

AdeC - 17

Uhu - 17

Administrator: Brandon | Moderators: VertigoSol


© - Version 3.1.4 (Build 357)