2020-04-15から1日間の記事一覧

次ページのタイトルを表示

2020/09/26確認 QiitaのAPIでタイトルを表示 タイトルを表示する処理をfuncにして、引数でページ数を指定できるようにします。 func myload(page: Int) { func名は任意。 class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSour…

cellをタップした時にURLを渡してWebViewを表示

右上の+をクリックして、View Controllerを追加して、WebKit Viewを追加します。 View ControllerのStoryboard IDをMyWebViewにし、Use Storyboard IDにチェックします。 WebViewController.swiftに外部からURLを受け取れるように変数を追加します。 class …

cellのdetailTextLabelを表示

2020/09/26確認 QiitaのAPIでタイトルを表示 Table View CellのStyleをSubtitleに変更します。 detailTextLabelに値をセット func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell: UITableViewCell…