Subscribe ( )

iPhone Programming Tutorials


 

Forum

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! 

Search 

About the iCodeBlog forum

Most Users Ever Online:

44


Currently Online:

2 Guests

Forum Stats:

Groups: 2

Forums: 6

Topics: 419

Posts: 893

Membership:

There are 934 Members

There has been 1 Guest

There are 2 Admins

There is 1 Moderator

Top Posters:

bobcubsfan – 54

crazyiez – 30

Uhu – 17

AdeC – 17

Nick – 15

jitesh61 – 12

Administrators: Brandon (88 Posts), Collin (0 Posts)

Moderators: VertigoSol (26 Posts)



©   

  • Posted by on 6 Aug 2008 in Uncategorized
  •   |  
  •   |  
  •   |  
  • Comments Off

Comments are closed.