回答編集履歴

1

パス取得方法修正

2016/02/23 14:17

投稿

TakeOne
TakeOne

スコア6299

test CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  ```Swift
12
12
 
13
- let gifData = NSData(contentsOfFile: NSBundle.mainBundle().bundlePath.stringByAppendingString("/animation.gif"))!
13
+ let gifData = NSData(contentsOfFile: NSBundle.mainBundle().pathForResource("animation",ofType:"gif")!)!
14
14
 
15
15
  let animationGifView = UIWebView(frame: CGRect(x: 0, y: 0, width: 50, height: 50))
16
16