I am working as a developer for the iPhone applications, but i m stuck at certain point, can anyone tell me that how do i handle the events of C or C++ in Xcode 3.2 for the iPhone development?
Asked
Active
Viewed 311 times
0
-
Which C/C++ events ? These languages don't have a concept of events per se, only certain libraries/frameworks have. – DarkDust Apr 20 '11 at 08:27
-
Do you mean key press event as in keyboard ? These are not C or C++ events. Use a UITextField. See also [this related question](http://stackoverflow.com/questions/3717141/how-to-detect-keyboard-events-on-hardware-keyboard-on-iphone-ios) and read the [UITextField reference](http://developer.apple.com/library/ios/#documentation/uikit/reference/UITextField_Class/Reference/UITextField.html). – DarkDust Apr 20 '11 at 08:36
1 Answers
0
If you want to handle events for a UIView or any class which is subclassed from UIResponder... Just overhide touch points and handle events there...
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesBegan:touches withEvent:event];
}
-(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesEnded withEvent:event];
}
-(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesMoved withEvent:event];
}

Chandan Shetty SP
- 5,087
- 6
- 42
- 63