티스토리 뷰
728x90
출처 : ios - Swift - How to animate Images? - Stack Overflow
// // ViewController.swift // AniImage // // Created by bluesanta on 2017. 6. 10.. // Copyright © 2017년 bluesanta. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var indicatorImage: UIImageView! var imageArray = [UIImage]() override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. for i in 1...5 { imageArray.append(UIImage(named: String(format : "%02d.png", i))!) } indicatorImage.animationImages = imageArray indicatorImage.animationDuration = 0.7 } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @IBAction func startClicked(_ sender: UIButton) { indicatorImage.startAnimating() } @IBAction func stopClicked(_ sender: UIButton) { indicatorImage.stopAnimating() } }
댓글
300x250
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- Delphi Tip
- sas2009
- 일본여행
- oracle
- MySQL
- 동경
- KOBA
- Mac
- 송주경
- 지스타2007
- ffmpeg
- 레이싱모델 익스트림 포토 페스티벌
- android
- Java
- Delphi
- 전예희
- Xcode
- flex
- Spring
- SAS
- 튜닝쇼 2008
- ubuntu
- Linux
- koba2010
- JavaScript
- BPI-M4
- NDK
- 서울오토살롱
- Spring MVC
- ble
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함