mlecho
unread,Nov 4, 2009, 11:51:23 PM11/4/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to iPhone SDK Development
hi, i am learning how to use a uisegmentedcontrol. I have intanatiated
and successfully implemented addTarget to the object. I can log
successful touches, but how do i know which index of the
UISegmentedControl did the event? here is my code:
// Implement viewDidLoad to do additional setup after loading the
view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
[segController addTarget:self action:@selector(segClickHandler:)
forControlEvents:UIControlEventValueChanged];
}
-(void)segClickHandler:(id) sender
{
NSLog(@"alsdhfl %@",sender);
}
as i stated, i can log the sender object, but i get
UISegmentedControl, frame size, etc...but i have no idea which part of
the uisegmentedcontrol was responsible for the event....ideas?