我想在从屏幕左侧的文字来,当它到达它的位置我希望文本对TextView的右侧规模.这是动画文件.
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- This is where the view moves onto the screen -->
<translate
android:fromXDelta="-200%"
android:toXDelta="0%"
android:fromYDelta="0%"
android:toYDelta="0%"
android:duration="1000"
android:zAdjustment="top" ></translate>
<!-- this is where I am scaling the text it currently aligns on the left side of the textview -->
<scale
android:fromXScale="1.0"
android:fromYScale="1.0"
android:toXScale=".2"
android:startOffset="500"
android:toYScale="1.0"
android:duration="1000"></scale>
<!-- I am then trying to make the text bounce over the left side of the textview -->
<scale
android:fromXScale="1.0"
android:fromYScale="1.0"
android:toXScale="7.0"
android:startOffset="1500"
android:toYScale="1.0"
android:duration="200"></scale>
<!-- I am …Run Code Online (Sandbox Code Playgroud) 我正在尝试回应SKScene子类中的新闻.我可以在我的ViewController中覆盖响应者pressEnded就好了,但是当我将pressEnded覆盖移动到我的SKScene子类中时,我不再接收任何调用.
下面是我的pressEnabled覆盖,它在ViewController中按预期工作
override func pressesEnded(presses: Set<UIPress>, withEvent event: UIPressesEvent?) {
print("press")
}
Run Code Online (Sandbox Code Playgroud)
有谁知道如何在SKScene内接受按钮按下?