<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.nonip.net/index.php?action=history&amp;feed=atom&amp;title=Ios%2Fswift%2FTableView%2F%E5%89%8A%E9%99%A4%E4%B8%A6%E6%9B%BF%E5%87%A6%E7%90%86</id>
	<title>Ios/swift/TableView/削除並替処理 - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.nonip.net/index.php?action=history&amp;feed=atom&amp;title=Ios%2Fswift%2FTableView%2F%E5%89%8A%E9%99%A4%E4%B8%A6%E6%9B%BF%E5%87%A6%E7%90%86"/>
	<link rel="alternate" type="text/html" href="https://wiki.nonip.net/index.php?title=Ios/swift/TableView/%E5%89%8A%E9%99%A4%E4%B8%A6%E6%9B%BF%E5%87%A6%E7%90%86&amp;action=history"/>
	<updated>2026-05-01T21:32:49Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.nonip.net/index.php?title=Ios/swift/TableView/%E5%89%8A%E9%99%A4%E4%B8%A6%E6%9B%BF%E5%87%A6%E7%90%86&amp;diff=2952&amp;oldid=prev</id>
		<title>Admin: Admin がページ「Ios/swfit/TableView/削除並替処理」を「Ios/swift/TableView/削除並替処理」に移動しました</title>
		<link rel="alternate" type="text/html" href="https://wiki.nonip.net/index.php?title=Ios/swift/TableView/%E5%89%8A%E9%99%A4%E4%B8%A6%E6%9B%BF%E5%87%A6%E7%90%86&amp;diff=2952&amp;oldid=prev"/>
		<updated>2016-08-06T16:08:03Z</updated>

		<summary type="html">&lt;p&gt;Admin がページ「&lt;a href=&quot;/index.php?title=Ios/swfit/TableView/%E5%89%8A%E9%99%A4%E4%B8%A6%E6%9B%BF%E5%87%A6%E7%90%86&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Ios/swfit/TableView/削除並替処理 (存在しないページ)&quot;&gt;Ios/swfit/TableView/削除並替処理&lt;/a&gt;」を「&lt;a href=&quot;/index.php?title=Ios/swift/TableView/%E5%89%8A%E9%99%A4%E4%B8%A6%E6%9B%BF%E5%87%A6%E7%90%86&quot; title=&quot;Ios/swift/TableView/削除並替処理&quot;&gt;Ios/swift/TableView/削除並替処理&lt;/a&gt;」に移動しました&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2016年8月6日 (土) 16:08時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.nonip.net/index.php?title=Ios/swift/TableView/%E5%89%8A%E9%99%A4%E4%B8%A6%E6%9B%BF%E5%87%A6%E7%90%86&amp;diff=2951&amp;oldid=prev</id>
		<title>2016年8月6日 (土) 15:28にAdminによる</title>
		<link rel="alternate" type="text/html" href="https://wiki.nonip.net/index.php?title=Ios/swift/TableView/%E5%89%8A%E9%99%A4%E4%B8%A6%E6%9B%BF%E5%87%A6%E7%90%86&amp;diff=2951&amp;oldid=prev"/>
		<updated>2016-08-06T15:28:30Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2016年8月6日 (土) 15:28時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;1行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;1行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     @IBOutlet weak var tagTableView: UITableView!&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     @IBOutlet weak var tagTableView: UITableView!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     private var _tags: Array&amp;lt;String&amp;gt; = []&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     private var _tags: Array&amp;lt;String&amp;gt; = [&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;タイトル１&quot;, &quot;タイトル２&quot;, &quot;タイトル３&quot;&lt;/ins&gt;]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     override func viewDidLoad() {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     override func viewDidLoad() {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         super.viewDidLoad()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         super.viewDidLoad()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.nonip.net/index.php?title=Ios/swift/TableView/%E5%89%8A%E9%99%A4%E4%B8%A6%E6%9B%BF%E5%87%A6%E7%90%86&amp;diff=2949&amp;oldid=prev</id>
		<title>Admin: ページの作成:「     @IBOutlet weak var tagTableView: UITableView!     private var _tags: Array&lt;String&gt; = []     override func viewDidLoad() {         super.viewDidLoad()         let rig...」</title>
		<link rel="alternate" type="text/html" href="https://wiki.nonip.net/index.php?title=Ios/swift/TableView/%E5%89%8A%E9%99%A4%E4%B8%A6%E6%9B%BF%E5%87%A6%E7%90%86&amp;diff=2949&amp;oldid=prev"/>
		<updated>2016-08-06T14:37:54Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「     @IBOutlet weak var tagTableView: UITableView!     private var _tags: Array&amp;lt;String&amp;gt; = []     override func viewDidLoad() {         super.viewDidLoad()         let rig...」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
    @IBOutlet weak var tagTableView: UITableView!&lt;br /&gt;
    private var _tags: Array&amp;lt;String&amp;gt; = []&lt;br /&gt;
    override func viewDidLoad() {&lt;br /&gt;
        super.viewDidLoad()&lt;br /&gt;
        let rightBarButtonItem: UIBarButtonItem = editButtonItem()&lt;br /&gt;
        self.navigationItem.setRightBarButtonItems([rightBarButtonItem], animated: true)&lt;br /&gt;
    }&lt;br /&gt;
    override func setEditing(editing: Bool, animated: Bool) {&lt;br /&gt;
        super.setEditing(editing, animated: animated)&lt;br /&gt;
        tagTableView.editing = editing&lt;br /&gt;
    }&lt;br /&gt;
    // 削除可能判定&lt;br /&gt;
    func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -&amp;gt; Bool {&lt;br /&gt;
        return true&lt;br /&gt;
    }&lt;br /&gt;
    // 削除処理&lt;br /&gt;
    func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {&lt;br /&gt;
        _tags.removeAtIndex(indexPath.row)&lt;br /&gt;
        tagTableView.deleteRowsAtIndexPaths([NSIndexPath(forRow: indexPath.row, inSection: 0)],&lt;br /&gt;
                                         withRowAnimation: UITableViewRowAnimation.Fade)&lt;br /&gt;
    }&lt;br /&gt;
    // 並び替え可能判定&lt;br /&gt;
    func tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -&amp;gt; Bool {&lt;br /&gt;
        return true&lt;br /&gt;
    }&lt;br /&gt;
    // 並び替え処理&lt;br /&gt;
    func tableView(tableView: UITableView, moveRowAtIndexPath sourceIndexPath: NSIndexPath, toIndexPath destinationIndexPath: NSIndexPath) {&lt;br /&gt;
        let targetTitle = _tags[sourceIndexPath.row]&lt;br /&gt;
        if let index = _tags.indexOf(targetTitle) {&lt;br /&gt;
            _tags.removeAtIndex(index)&lt;br /&gt;
            _tags.insert(targetTitle, atIndex: destinationIndexPath.row)&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
参考：http://himaratsu.hatenablog.com/entry/tableview/editmode&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>