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

Featured Member Applications

TanZen ($0.99)

Endless Walls ($0.99)

Air Hockey ($0.99)

SUPER STRIKE - Motion Bowl ($0.99)

BarSlot ($0.99)

MeterRead ($0.99)

Colorblind Helper ($4.99)

gContacts ($1.99)

ProgCalc ($1.99)

Forex On The Go Lite (FREE)

HUE knewit! ($0.99)

Want your application to be advertised here?

» Advertisements


Visit our friends over at The App Show! Steve and Dave produce a weekly show shining a light on the iPhone 2.0 software and the applications being developed by the amazing development community for the iPhone SDK!
» Online Users: 102
19 members and 83 guests
blackyE, BSDimwit, bugnote, c0der, colinhumber, EeKay, erotsppa, foxtucker, jeff_lamarche, logicpaw, mahr, Meltor, MrsReznor, RickMaddy, roberthuttinger, robotcult, Smittens, uprise78, volk
Most users ever online was 207, 10-24-2008 at 09:29 AM.
» Stats
Members: 3,915
Threads: 5,624
Posts: 23,284
Top Poster: scottiphone (705)
Welcome to our newest member, raysms
Reply
 
LinkBack Thread Tools Display Modes
Old 08-27-2008, 02:20 PM   #1 (permalink)
Junior Member
 
Join Date: Aug 2008
Posts: 28
Default Add click event to UITableView Section Header

I have a UITableView with custom section headers using viewForHeaderInSection. I would like to hook up a click event for this section header row, but can't seem to figure out how to do it.

I'm creating a new UIView in viewForHeaderInSection. I think I just need to know how to manually wire up an event like touchesBegan in code. Or set the delegate?
Trilitech is offline   Reply With Quote
Old 08-28-2008, 10:29 AM   #2 (permalink)
Junior Member
 
Join Date: Aug 2008
Posts: 9
Default

By override following metoh u can change the section or header

(UIView *)tableViewUITableView *)tableView viewForHeaderInSectionNSInteger)section

its return the UIView we can set the touch begin event.
lightygalaxy is offline   Reply With Quote
Old 08-28-2008, 12:32 PM   #3 (permalink)
Junior Member
 
Join Date: Aug 2008
Posts: 28
Default

I'm already overriding viewForHeaderInSection. I just don't know how to programatically wire up touchesBegan in code.
Trilitech is offline   Reply With Quote
Old 08-29-2008, 03:45 AM   #4 (permalink)
Junior Member
 
Join Date: Aug 2008
Posts: 9
Default

- (void)touchesBeganNSSet *)touches withEventUIEvent *)event
lightygalaxy is offline   Reply With Quote
Old 08-29-2008, 05:47 PM   #5 (permalink)
Junior Member
 
Join Date: Aug 2008
Posts: 28
Default

Quote:
Originally Posted by lightygalaxy View Post
- (void)touchesBeganNSSet *)touches withEventUIEvent *)event
Yeah, that's what I thought too. I tried it already though. It fires when I click on an empty area in the main view, but not when I click on the section header. I keep thinking I need to tell the new views I'm creating to look for events in my controller (set a delegate or something), but I don't see an option for that.
Trilitech is offline   Reply With Quote
Reply

Bookmarks

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
Forum Jump

Powered by vBadvanced CMPS v3.0.1

All times are GMT -5. The time now is 05:48 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0