swift を勉強中の初心者です。
現在、テーブルビューセル内のテキストフォントの変更が反映されず、困っております。
エラーメッセージなどはなく動くのですが、フォントのサイズのみ反映され、スタイルの"Baskerville"という部分の変更は反映されません。
下記のコード内で間違っている点、又は書き足す必要がある点などございますでしょうか?
どなたかお分かりになる方がいらっしゃれば、ご指摘頂けますと幸いです。
コード func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCellWithIdentifier("data", forIndexPath: indexPath) as UITableViewCell cell.textLabel!.text = memos[indexPath.row] cell.textLabel?.font = UIFont(name: "Baskerville", size: 28) cell.textLabel?.textColor = UIColor.blackColor() //画像のサイズ調整 let gazo1 = gazo![indexPath.row] cell.imageView?.image = gazo1.resize(CGSizeMake(100, 150)) cell.imageView?.contentMode = .ScaleAspectFill //セルの背景 self.piyo.rowHeight = 80 cell.backgroundColor = UIColor.clearColor() //セルを押した時の色 let cellSelectedBgView = UIView() cellSelectedBgView.backgroundColor = UIColor.lightTextColor() cell.selectedBackgroundView = cellSelectedBgView return cell }
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/06/23 12:55