如何n从IntSwift中的数组中删除第一个元素?
例如:
var array = [0, 1, 2, 3, 4, 5, 6]
let n = 4
Run Code Online (Sandbox Code Playgroud)
结果数组包含以下元素:
[4, 5, 6]
Run Code Online (Sandbox Code Playgroud) 我使用这个SwiftGif库。我在 UIImageView 中放入了一些 gif。这是我的代码:
dispatch_async(dispatch_get_main_queue(),{
self.img1.image=UIImage.gifWithURL("http://mywebsite/img1.gif")
self.img2.image=UIImage.gifWithURL("http://mywebsite/img2.gif")
self.img3.image=UIImage.gifWithURL("http://mywebsite/img1.gif")
})
Run Code Online (Sandbox Code Playgroud)
gif 显示正确,但动画很慢。我怎样才能解决这个问题?谢谢!