在启动画面的入门流程中旋转一圈后停止自动旋转

时间:2018-05-10 20:04:38

标签: swift

在我的应用程序中,入门/启动画面流程中有3个屏幕,设置为每5秒自动旋转

private var pageChangeTimer: Timer?
let pageChangeInterval: TimeInterval = 5.0
var pageChangeTimer = Timer.scheduledTimer(
        withTimeInterval: pageChangeInterval,
        repeats: true) { [weak self] timer in
            self?.rotateScreen()
    }

如果在启动画面的入门流程中所有三个屏幕旋转一圈后如何停止自动旋转

1 个答案:

答案 0 :(得分:0)

您可以使用计时器的ERROR! The field 'hosts' has an invalid value, which includes an undefined variable. The error was: 'scraper_hosts' is undefined The error appears to have been in 'my-playbook.yml': line 8, column 3, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - hosts: "{{my_hosts}}" ^ here We could be wrong, but this one looks like it might be an issue with missing quotes. Always quote template expression brackets when they start a value. For instance: with_items: - {{ foo }} Should be written as: with_items: - "{{ foo }}" 实例方法来停止它

class Foo(list):
    def __lt__(self, other):
        return self[1] > other[1] or (self[1] == other[1] and self[0] < other[0])

sorted(l, key=Foo)