티스토리 뷰
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
- sas2009
- MySQL
- Delphi
- BPI-M4
- 레이싱모델 익스트림 포토 페스티벌
- 서울오토살롱
- Delphi Tip
- ble
- flex
- Spring MVC
- 일본여행
- 동경
- 지스타2007
- Mac
- Spring
- Linux
- 전예희
- KOBA
- 튜닝쇼 2008
- ubuntu
- NDK
- ffmpeg
- SAS
- Java
- Xcode
- 송주경
- koba2010
- oracle
- JavaScript
- android
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |
글 보관함