-1

こんにちは、iPhone に Assistive touch があるように、アプリでも必要な場所に uibutton を移動したいので、同じように、アプリにそのようなボタンが必要です。それを行うことは可能ですか?そのためのいくつかのリンク

4

1 に答える 1

0

この質問は何度も聞かれます....ここに答えがあります

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {

        UITouch *touch = [[event allTouches] anyObject];
        CGPoint touchLocation = [touch locationInView:self.view];
        button.frame.x = touchlocation.x;
        button.frame.y = touchlocation.y;
    }
于 2015-11-19T04:42:47.883 に答える