tag:crieit.net,2005:https://crieit.net/tags/iPad/feed 「iPad」の記事 - Crieit Crieitでタグ「iPad」に投稿された最近の記事 2021-11-21T08:11:46+09:00 https://crieit.net/tags/iPad/feed tag:crieit.net,2005:PublicArticle/17749 2021-11-11T17:42:02+09:00 2021-11-21T08:11:46+09:00 https://crieit.net/posts/iPadOS-15 iPadOS 15 にするとカーソルキーが動かなくなる問題の修正方法 <p><a target="_blank" rel="nofollow noopener" href="https://qiita.com/danjiro/items/253e5a33a38599098274">フリーソフト9VAeきゅうべえ</a> 、iPad版について。<br /> iPad OS 15 にすると、キーボードのカーソルキーがきかなくなった。Alt+カーソルキーは動作するが、カーソルキーだけ押すと反応しない。</p> <p>調べると、UIKeyCommand の wantsPriorityOverSystemBehavior を YES に設定しないといけないらしい。カーソルキーがOSのショートカットに割り当てられたみたいだ。<br /> 修正には、Xcode 13 (Big Sur以上)が必要</p> <p>修正前</p> <pre><code>- (NSArray *)keyCommands { return @[ [UIKeyCommand keyCommandWithInput: UIKeyInputUpArrow modifierFlags: 0 action: @selector(keyUp)], [UIKeyCommand keyCommandWithInput: UIKeyInputDownArrow modifierFlags: 0 action: @selector(keyDown)], [UIKeyCommand keyCommandWithInput: UIKeyInputLeftArrow modifierFlags: 0 action: @selector(keyLeft)], [UIKeyCommand keyCommandWithInput: UIKeyInputRightArrow modifierFlags: 0 action: @selector(keyRight)] ]; } </code></pre> <p>修正後</p> <pre><code>- (NSArray *)keyCommands { UIKeyCommand *ukey = [UIKeyCommand keyCommandWithInput: UIKeyInputUpArrow modifierFlags: 0 action: @selector(keyUp)]; UIKeyCommand *dkey = [UIKeyCommand keyCommandWithInput: UIKeyInputDownArrow modifierFlags: 0 action: @selector(keyDown)]; UIKeyCommand *lkey = [UIKeyCommand keyCommandWithInput: UIKeyInputLeftArrow modifierFlags: 0 action: @selector(keyLeft)]; UIKeyCommand *rkey = [UIKeyCommand keyCommandWithInput: UIKeyInputRightArrow modifierFlags: 0 action: @selector(keyRight)]; if (@available(iOS 11.0, *)) if(@available(iOS 15.0, *)){ ukey.wantsPriorityOverSystemBehavior = YES; dkey.wantsPriorityOverSystemBehavior = YES; lkey.wantsPriorityOverSystemBehavior = YES; rkey.wantsPriorityOverSystemBehavior = YES; } return @[ ukey, dkey, lkey, rkey ]; } </code></pre> <p>if (@available(iOS 11.0, *)) をいれておかないと、iOS 10 で落ちた。</p> Danjiro Daiwa tag:crieit.net,2005:PublicArticle/14576 2018-10-22T15:12:46+09:00 2020-01-01T07:32:29+09:00 https://crieit.net/posts/iPhone-iPad-ZWSP iPhone/iPadのキーボードからZWSPを入力できるようにする方法 <p>Mastodonをやっていると「ハッシュタグの後に空白文字を入れるのがかっこ悪い…」と思いませんか?<br /> でも、iPhone/iPadのキーボードからは直接ゼロ幅スペースを入力する方法がありません(たぶん)。</p> <p>そこで、ゼロ幅スペースを拾ってきて単語登録することでiPhone/iPadのキーボードからゼロ幅スペースを入力する方法をご紹介します。</p> <h2 id="行程"><a href="#%E8%A1%8C%E7%A8%8B">行程</a></h2> <ol> <li>本ページからゼロ幅スペースをコピーする</li> <li>ユーザ辞書登録にゼロ幅スペースを登録する</li> </ol> <h2 id="ゼロ幅スペースのネタ"><a href="#%E3%82%BC%E3%83%AD%E5%B9%85%E3%82%B9%E3%83%9A%E3%83%BC%E3%82%B9%E3%81%AE%E3%83%8D%E3%82%BF">ゼロ幅スペースのネタ</a></h2> <p>まずは以下をコピーしてください。<br /> <code>a</code>と<code>;</code>の間にゼロ幅スペースが入っています。</p> <blockquote> <p>a​;</p> </blockquote> <h2 id="ユーザ辞書登録"><a href="#%E3%83%A6%E3%83%BC%E3%82%B6%E8%BE%9E%E6%9B%B8%E7%99%BB%E9%8C%B2">ユーザ辞書登録</a></h2> <p>設定アプリ→一般→キーボード→ユーザ辞書を開き、右上の<code>+</code>をタップして単語登録画面を開きます。</p> <p><a href="https://crieit.now.sh/upload_images/916e5b3e7ba1910feb80fd12fc2749795bcd6a16268f4.jpg" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/916e5b3e7ba1910feb80fd12fc2749795bcd6a16268f4.jpg?mw=700" alt="単語登録画面" /></a></p> <p>単語に先ほどコピーした<code>a;</code>をペーストし、読みを「ん」とします。<br /> ここでは読みを「ん」としましたが、ご自分でわかりやすいものにしても大丈夫です。</p> <p>このままでは毎回<code>a</code>と<code>;</code>を削除しなければならなくなるので、<code>a</code>を削除しておきます。<br /> <code>;</code>まで削除すると登録ができなくなるので、ゼロ幅スペースと<code>;</code>は残しておきます。</p> <p><a href="https://crieit.now.sh/upload_images/b628844a8f504d43add4d04d50f1ecff5bcd6a3584b0c.jpg" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/b628844a8f504d43add4d04d50f1ecff5bcd6a3584b0c.jpg?mw=700" alt="登録内容" /></a></p> <h2 id="ゼロ幅スペースの入力"><a href="#%E3%82%BC%E3%83%AD%E5%B9%85%E3%82%B9%E3%83%9A%E3%83%BC%E3%82%B9%E3%81%AE%E5%85%A5%E5%8A%9B">ゼロ幅スペースの入力</a></h2> <p>単語登録後、ゼロ幅スペースを入力したいところで「ん」と入力して変換し、<code>;</code>という候補を選択します。<br /> 入力後<code>;</code>を削除すると、目には見えませんが文章にゼロ幅スペースが入力された状態になります。</p> hidao