Xcode、Swift初心者です。
コードを書いているとどうしても解決できない箇所があり、ご質問させていただきました。
let cell の箇所が警告表示で解除できません。
どうしたら解除できますでしょうか?
よろしくお願いいたします。
エラー文は、下記です。
initialization of immutable value "cell" was never used; consider repalacing with assignment to '' or removing it
Fix-it Replace "let cell" with ""
コードは下記です。
import UIKit
class ViewController: UIViewController,UITableViewDelegate {
@IBOutlet var sliderValue: UISlider! @IBAction func sliderMoved(sender: AnyObject) { print(sliderValue) } func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int{ return 20 } func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell{ let cell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: "Cell") let timesTable = sliderValue.value * 20 } override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. }
}
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。