- メディア登録(「Add Multimedia」)。
- External Mediaに、Youtube/Vimeoを登録する。
- ブログ記事の新規作成(投稿 -> 新規追加)。
- Youtube/VimeoのURLを記事本文に貼り付けて保存。
- → ビデオサムネイルが生成される。
- 保存後は、Youtubeのリンクは削除。
- エディタを CLASSIC MODE > テキスト に変更。
- 「11_記事追加.txt」の内容を貼り付ける。
- エディタを BACKEND EDITOR に変更。
- Youtube/VimeoのURLを記事本文に貼り付けて保存。
- 表示するメディアを該当のものに変更する。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<div class="star-rating-container"> | |
<!-- 星の表示 --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FilterViewController : UIViewController { | |
override func viewDidLoad() { | |
// ナビゲーション右に保存ボタンを追加します. | |
let rightButton = UIBarButtonItem(title: "保存する", style: .plain, target: self, action: #selector(FilterViewController.saveImage)) | |
self.navigationItem.rightBarButtonItem = rightButton | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// FilterViewController.swift | |
// CameraFilter | |
// | |
// Created by Munesada Yohei on 2019/02/19. | |
// Copyright © 2019 Munesada Yohei. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// FilterViewController.swift | |
// CameraFilter | |
// | |
// Created by Munesada Yohei on 2019/02/19. | |
// Copyright © 2019 Munesada Yohei. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Api { | |
// 省略... | |
// コメントを追加. | |
static func addComment(postId: Int, comment: String, callback: @escaping ((String?) -> Void)) { | |
// APIトークンを取得. | |
guard let apiToken = UserDefaults.standard.string(forKey: "apiToken") else { | |
callback("ログインが必要です") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CommentViewController : UITableViewController { | |
// 省略... | |
// コメント追加ボタンが押された時. | |
@objc func onTapAddComment() { | |
// アラート表示で、コメント入力ができるようにします. | |
let alert = UIAlertController(title: "", message: "コメントを入力してください", preferredStyle: .alert) | |
// 入力欄を追加. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CommentViewController : UITableViewController { | |
// 投稿データ. | |
var post: Post? | |
// コメントデータ. | |
var comments: [Comment] = [] | |
// 表示する際に呼び出される. | |
override func viewDidLoad() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Api { | |
// 省略... | |
// コメントを取得. | |
static func getComments(postId: Int, callback: @escaping (String?, [Comment]?) -> Void) { | |
// APIトークンを取得. | |
guard let apiToken = UserDefaults.standard.string(forKey: "apiToken") else { | |
callback("ログインが必要です", nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Api { | |
// 省略... | |
// いいねを追加. | |
static func addLike(postId: Int, callback: @escaping (String?) -> Void) { | |
print("addLike") | |
// APIトークンを取得. | |
guard let apiToken = UserDefaults.standard.string(forKey: "apiToken") else { |
NewerOlder