Update ViewController.m

This commit is contained in:
Duy Tran Khanh authored and GitHub committed 2021-01-13 13:13:42 +07:00
1 parent c7a5622ef6
commit 14b96856c0
1 file changed
+7 -7
+7 -7
View File
@@ -13,13 +13,6 @@
@end
void sendTouchEvent(NSSet* touches, int event) {
UITouch* touchEvent = [touches anyObject];
CGPoint locationInView = [touchEvent locationInView:self.view];
CGPoint normalizedPoint = getNormalizedPoint(self.view, locationInView);
callback_ViewController_onTouch(event, normalizedPoint.x, normalizedPoint.y);
}
@implementation ViewController
- (void)viewDidLoad
@@ -74,6 +67,13 @@ void sendTouchEvent(NSSet* touches, int event) {
callback_AppDelegate_didFinishLaunching(width_c, height_c);
}
void sendTouchEvent(NSSet* touches, int event) {
UITouch* touchEvent = [touches anyObject];
CGPoint locationInView = [touchEvent locationInView:self.view];
CGPoint normalizedPoint = getNormalizedPoint(self.view, locationInView);
callback_ViewController_onTouch(event, normalizedPoint.x, normalizedPoint.y);
}
// Equals to Android ACTION_DOWN
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{