function TForm1.PointsToString(const Event: TTouchEvent): string;
var
I: Integer;
begin
Result := '';
for I := 0 to Length(Event.Points) - 1 do
begin
if I = 0 then
Result := Format('[%f:%f]', [Event.Points[I].Position.X,
Event.Points[I].Position.Y])
else
Result := Result + ' ' + Format('[%f:%f]', [Event.Points[I].Position.X,
Event.Points[I].Position.Y]);
end;
end;
procedure TForm1.OnTouchEvent(const Event: TTouchEvent);
begin
lbMultiTouch.Items.BeginUpdate;
try
case Event.EventType of
teDown: lbMultiTouch.Items.Add(Format('DOWN: %s', [PointsToString(Event)]));
teMove: lbMultiTouch.Items.Add(Format('MOVE: %s', [PointsToString(Event)]));
teUp: lbMultiTouch.Items.Add(Format('UP: %s', [PointsToString(Event)]));
end;
finally
lbMultiTouch.Items.EndUpdate;
end;
end;
Update: Second blog post with patch free multitouch fix for IOS.
Update: Third blog post with touched control and relative coordinates.
Head over to his blog to download the source code and find out how to patch your IOS file.