代码拉取完成,页面将自动刷新
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Xcode Tips</title>
<meta name="description" content="Use the shortcut ⌘ + J along with the arrow keys ◀▲▼▶ to switch between edit windows.">
<meta name="keywords" content="Xcode Tips">
<link rel="stylesheet" type="text/css" href="css/main.css?v=1.34.1">
<link rel="stylesheet" type="text/css" href="css/tocbot.css?v=1.34.1">
<link rel="stylesheet" type="text/css" href="css/media.css?v=1.34.1">
<link rel="stylesheet" type="text/css" href="css/sidebar.css?v=1.34.1">
<link rel="stylesheet" type="text/css" href="css/copy.css?v=1.34.1">
<link rel="stylesheet" type="text/css" href="css/demo-preview.css?v=1.34.1">
<link rel="icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAEIlJREFUeF7tnXtwVNUdx3/n7kIe8sgTNEjLTMeAUrVUKB0U0f6D1ZkKCqhBJKDSdjplHEnW6B8l0hZIQKBaq+KMQDvTOhYfnY5jpU7rg9pp0Y5aSysKA4SEAJJNIJjdkN3TOWuigcnuub97727u2fu9MzuJ7ve8vt/72XPP2XCvIBxwAA6kdUDAGzgAB9I7AEBwdsCBDA4AEJwecACA4ByAA84cwAzizDeUCogDACQgQWOYzhwAIM58Q6mAOABAAhI0hunMAQDizDeUCogDACQgQWOYzhwAIM58Q6mAOABAAhI0hunMAQDizDeUCogDACQgQWOYzhwAIM58Q6mAOABAAhI0hunMAQDizDeUCogDACQgQWOYzhwAIM58Q6mAOABAAhI0hunMgawC0tTU9DgRLRRCVDrrHqtUBxFFiSj1U0rZYVlWRzKZVP+v3bKsViJqi8fjbX19fa2NjY1JVu0BFG/atKlMSlmRSCQqhRAVRFQhpVRZqt9TP6WUJUR0wcBLCDHweyhHlm1PJBI7Hnzwwdez0V7WAGlubpbZ6LCHdbYLIVqllB8JIfZIKfc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bckAkrat7lo9525a4X8QGpHh751VJonc4jUCb3gG1kbGi4yUqT3SdI1LrDbXuwOGZA/tiZ3qvoh+N6+bUyAZEVV60LfqoFOLHnIagTe9AVd+ntKLjRbL6/5LofwVfpd+OnQvLvHRAyutjy0pf51bpCBDViJ2/yeJ2Jsj6ge+NWkaMp+0lN2V+UlKQjXIwdinEyvjSsY85KJrpn1/pqyt65tQsaSWXE4lvE8mp+hJQZHJg9mfv0fuFl9Ap6wIY5d6B16VaCoTEU/ElYz9xWp3jGcRpg/lSrnBH559IkinXQaditSVj88X7XI4DgDh0u/A3p2ZTIvmmw+K5LeZg/z+3HfRvawDERTYF26MvChLzXFSRg6LiP7HasV/PQUN52QQAcRFr8Y7otKQULxHRV1xUk9WiQtKinmUlv89qI3lcOQBxGW7hM53fIYv+SETFLqvyvDjgcG8pAHHvIRX9OnpLUorFQtK1RFThQZXOq5B0jAT9VUh6ATOHcxsHSgIQ9x6eU0PqsitJw7JjlLRGdPQuHfWBx0MKdHUAJNDxY/A6BwCIziG8H2gHAEig48fgdQ4AEJ1DeD/QDgCQQMePwescACA6h/B+oB0AIIGOH4PXOQBAdA7h/UA7AEACHT8Gr3MAgOgcwvuBdgCABDp+DF7nAADROYT3A+0AAAl0/Bi8zgEAonMI7wfaAQAS6PgxeJ0DAETnEN4PtAMAJNDxY/A6BwCIziG8H2gH/g8LPRyq8vuk8QAAAABJRU5ErkJggg==" type="image/x-icon">
<script src="js/copy.js?v=1.34.1"></script>
<script src="js/dark-mode.js?v=1.34.1"></script>
<script src="js/markdown-style.js?v=1.34.1"></script>
</head>
<body id="idoctotop"><a href="#idoctotop" class="gototop">top</a>
<header class="header">
<article class="inner warpper" style="max-width:720px;"><a class="logo" href="index.html"><img alt="Xcode Tips logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAEIlJREFUeF7tnXtwVNUdx3/n7kIe8sgTNEjLTMeAUrVUKB0U0f6D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Eig48fgdQ4AEJ1DeD/QDgCQQMePwescACA6h/B+oB0AIIGOH4PXOQBAdA7h/UA7AEACHT8Gr3MAgOgcwvuBdgCABDp+DF7nAADROYT3A+0AAAl0/Bi8zgEAonMI7wfaAQAS6PgxeJ0DAETnEN4PtAMAJNDxY/A6BwCIziG8H2gH/g8LPRyq8vuk8QAAAABJRU5ErkJggg==">
<span class="title">Xcode Tips</span></a>
<div class="content">
<ul class="menu">
<li><a href="index.html" target="" class="active">Home</a></li>
<li><a href="https://wangchujiang.com/#/app" target="__blank" class="">Apps</a></li>
<li><a href="https://wangchujiang.com/#/about" target="__blank" class="">About</a></li>
</ul><a href="https://github.com/jaywcjlove/xcode-tips" target="_blank" rel="noopener noreferrer" title="Github" name="Github" class="github"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path>
</svg></a>
<dark-mode permanent=""></dark-mode>
</div>
</article>
</header>
<div style="max-width:720px;" class="warpper-content warpper notocs">
<markdown-style theme-auto-switch-disabled="">
<p><a href="index.zh.html">简体中文</a></p>
<div align="center"><br><br>
<img src="https://github.com/user-attachments/assets/c77fcbc2-58d5-4538-bc12-cc148343a554" alt="Xcode Tips" width="160" height="160">
<h3 id="xcode-tips"><a aria-hidden="true" tabindex="-1" href="#xcode-tips" class="anchor"><span class="icon icon-link"></span></a>Xcode Tips</h3>
<p>Archive of the collection of Xcode tips I shared on <a href="https://x.com/jaywcjlove">x</a></p><br><!--rehype:style=border: 0;-->
<p>✦ My <a href="https://wangchujiang.com/#app">macOS/iOS</a> application ✦</p>
<p style="display: inline_block">
<a target="_blank" href="https://wangchujiang.com/key-clicker/" title="KeyClicker for macOS"><img align="center" alt="KeyClicker" height="50" width="50" src="https://github.com/user-attachments/assets/5a19fcb9-cb81-4855-b4ea-31c604d9612a"></a>
<a target="_blank" href="https://wangchujiang.com/daybar/" title="DayBar for macOS"><img align="center" alt="DayBar" height="50" width="50" src="https://github.com/user-attachments/assets/b67d4a2e-92e2-4d8c-8c6f-2a1eb3e2fa93"></a>
<a target="_blank" href="https://wangchujiang.com/iconed/" title="Iconed for macOS"><img align="center" alt="Iconed" height="50" width="50" src="https://github.com/user-attachments/assets/8a35dc7b-4faf-4e2a-9311-f66d6844a896"></a>
<a target="_blank" href="https://wangchujiang.com/rightmenu-master/" title="RightMenu Master for macOS"><img align="center" alt="RightMenu Master" height="50" width="50" src="https://github.com/user-attachments/assets/39a76541-71bf-4de7-a01c-c62f0557dff5"></a>
<a target="_blank" href="https://wangchujiang.com/paste-quick/" title="Paste Quick for macOS"><img align="center" alt="Quick RSS" height="50" width="50" src="https://github.com/user-attachments/assets/bdaad5b7-9810-44ce-8f17-8410864465d2"></a>
<a target="_blank" href="https://wangchujiang.com/quick-rss/" title="Quick RSS for macOS/iOS"><img align="center" alt="Quick RSS" height="50" width="50" src="https://github.com/user-attachments/assets/374106b5-a448-4d1d-9ccb-b04b6bc681ed"></a>
<a target="_blank" href="https://wangchujiang.com/web-serve/" title="Web Serve for macOS"><img align="center" alt="Web Serve" height="50" width="50" src="https://github.com/user-attachments/assets/e1d9f76f-0f3d-4ba5-8a15-253ee173bb1c"></a>
<a target="_blank" href="https://wangchujiang.com/copybook-generator/" title="Copybook Generator for macOS/iOS"><img align="center" alt="Copybook Generator" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/b90e42ff-158b-4534-82ca-5898fd0e8d73"></a>
<a target="_blank" href="https://wangchujiang.com/devtutor/" title="DevTutor for macOS/iOS"><img align="center" alt="DevTutor for SwiftUI" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/f15c154d-0192-48eb-8e0e-9e245ffd974a"></a>
<a target="_blank" href="https://wangchujiang.com/regex-mate/" title="RegexMate for macOS/iOS"><img align="center" alt="RegexMate" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/aabe5aa9-9a96-4390-8bed-c3e4023d0dea"></a>
<a target="_blank" href="https://wangchujiang.com/time-passage/" title="Time Passage for macOS/iOS"><img align="center" alt="Time Passage" height="50" width="50" src="https://github.com/jaywcjlove/time-passage/assets/1680273/6f30e429-e6f3-4dbe-9921-a5effe2a05e9"></a>
<a target="_blank" href="https://wangchujiang.com/IconizeFolder/" title="IconizeFolder for macOS"><img align="center" alt="Iconize Folder" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/fa9d8b9c-1e51-4ded-877c-fa5b21c47220"></a>
<a target="_blank" href="https://wangchujiang.com/TextSoundSaver/" title="Textsound Saver for macOS/iOS"><img align="center" alt="Textsound Saver" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/0595e842-980b-4574-8891-a8ba853a08be"></a>
<a target="_blank" href="https://wangchujiang.com/create-custom-symbols/" title="Create Custom Symbols for macOS"><img align="center" alt="Create Custom Symbols" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/8cd022ce-a3f1-4e89-b7c6-6fbd0d4db77c"></a>
<a target="_blank" href="https://wangchujiang.com/DevHub/" title="DevHub for macOS"><img align="center" alt="DevHub" height="50" width="50" src="https://github.com/user-attachments/assets/4a44a4fd-67ce-430b-af0a-72f18feaa47d"></a>
<a target="_blank" href="https://wangchujiang.com/ResumeRevise/" title="Resume Revise for macOS"><img align="center" alt="Resume Revise" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/c9954a20-1905-48de-bdf8-d71837974aa2"></a>
<a target="_blank" href="https://wangchujiang.com/palette-genius/" title="Palette Genius for macOS"><img align="center" alt="Palette Genius" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/27340413-d355-45b2-8f6f-6ac37682d957"></a>
<a target="_blank" href="https://wangchujiang.com/symbol-scribe/" title="Symbol Scribe for macOS"><img align="center" alt="Symbol Scribe" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/c7249f05-fa70-4def-a1e9-571d5f171fc9"></a>
</p><br><br><br>
</div>
<h3 id="-switch-edit-window"><a aria-hidden="true" tabindex="-1" href="#-switch-edit-window" class="anchor"><span class="icon icon-link"></span></a>💡 Switch Edit Window</h3>
<p>Use the shortcut <kbd>⌘</kbd> + <kbd>J</kbd> along with the arrow keys <kbd>◀</kbd><kbd>▲</kbd><kbd>▼</kbd><kbd>▶</kbd> to switch between edit windows.</p>
<details open class="octicon octicon-video">
<summary>
<svg aria-hidden="" height="16" width="16" viewBox="0 0 16 16" version="1.1" data-view-component="" class="octicon octicon-device-camera-video">
<path fill-rule="evenodd" d="M16 3.75a.75.75 0 00-1.136-.643L11 5.425V4.75A1.75 1.75 0 009.25 3h-7.5A1.75 1.75 0 000 4.75v6.5C0 12.216.784 13 1.75 13h7.5A1.75 1.75 0 0011 11.25v-.675l3.864 2.318A.75.75 0 0016 12.25v-8.5zm-5 5.075l3.5 2.1v-5.85l-3.5 2.1v1.65zM9.5 6.75v-2a.25.25 0 00-.25-.25h-7.5a.25.25 0 00-.25.25v6.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-4.5z"></path>
</svg><span aria-label="Video description Switch Edit Window">Switch Edit Window</span><span class="dropdown-caret"></span>
</summary>
<video muted controls style="max-height:640px;" src="https://github.com/user-attachments/assets/7b405d04-522e-44cd-9839-04f1cd409004?title=Switch+Edit+Window&rehype=video"></video>
</details>
<h3 id="-quick-code-navigation"><a aria-hidden="true" tabindex="-1" href="#-quick-code-navigation" class="anchor"><span class="icon icon-link"></span></a>💡 Quick Code Navigation</h3>
<p>Hover over the minimap and hold <kbd>⌘</kbd> to display an index of all method and variable names, allowing quick navigation to them.</p>
<details open class="octicon octicon-video">
<summary>
<svg aria-hidden="" height="16" width="16" viewBox="0 0 16 16" version="1.1" data-view-component="" class="octicon octicon-device-camera-video">
<path fill-rule="evenodd" d="M16 3.75a.75.75 0 00-1.136-.643L11 5.425V4.75A1.75 1.75 0 009.25 3h-7.5A1.75 1.75 0 000 4.75v6.5C0 12.216.784 13 1.75 13h7.5A1.75 1.75 0 0011 11.25v-.675l3.864 2.318A.75.75 0 0016 12.25v-8.5zm-5 5.075l3.5 2.1v-5.85l-3.5 2.1v1.65zM9.5 6.75v-2a.25.25 0 00-.25-.25h-7.5a.25.25 0 00-.25.25v6.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-4.5z"></path>
</svg><span aria-label="Video description Quick Code Navigation">Quick Code Navigation</span><span class="dropdown-caret"></span>
</summary>
<video muted controls style="max-height:640px;" src="https://github.com/user-attachments/assets/d3f57263-a82c-435a-a759-0747fcf1b41d?title=Quick+Code+Navigation&rehype=video"></video>
</details>
<h3 id="-code-snippet-generation-function"><a aria-hidden="true" tabindex="-1" href="#-code-snippet-generation-function" class="anchor"><span class="icon icon-link"></span></a>💡 Code Snippet Generation Function</h3>
<p>Select a piece of view code with your mouse, right-click to open the menu, and choose <code>Refactor</code> -> <code>Extract to Method</code> to generate a function and edit the function name.</p>
<details open class="octicon octicon-video">
<summary>
<svg aria-hidden="" height="16" width="16" viewBox="0 0 16 16" version="1.1" data-view-component="" class="octicon octicon-device-camera-video">
<path fill-rule="evenodd" d="M16 3.75a.75.75 0 00-1.136-.643L11 5.425V4.75A1.75 1.75 0 009.25 3h-7.5A1.75 1.75 0 000 4.75v6.5C0 12.216.784 13 1.75 13h7.5A1.75 1.75 0 0011 11.25v-.675l3.864 2.318A.75.75 0 0016 12.25v-8.5zm-5 5.075l3.5 2.1v-5.85l-3.5 2.1v1.65zM9.5 6.75v-2a.25.25 0 00-.25-.25h-7.5a.25.25 0 00-.25.25v6.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-4.5z"></path>
</svg><span aria-label="Video description Code Snippet Generation Function">Code Snippet Generation Function</span><span class="dropdown-caret"></span>
</summary>
<video muted controls style="max-height:640px;" src="https://github.com/user-attachments/assets/9f444b4f-133a-4827-b6c1-267d23b8b8fe?title=Code+Snippet+Generation+Function&rehype=video"></video>
</details>
<h3 id="-format-to-multiple-lines"><a aria-hidden="true" tabindex="-1" href="#-format-to-multiple-lines" class="anchor"><span class="icon icon-link"></span></a>💡 Format to Multiple Lines</h3>
<p>Select a line of code and press <kbd>Control</kbd> + <kbd>m</kbd> to format it as multiline code.</p>
<details open class="octicon octicon-video">
<summary>
<svg aria-hidden="" height="16" width="16" viewBox="0 0 16 16" version="1.1" data-view-component="" class="octicon octicon-device-camera-video">
<path fill-rule="evenodd" d="M16 3.75a.75.75 0 00-1.136-.643L11 5.425V4.75A1.75 1.75 0 009.25 3h-7.5A1.75 1.75 0 000 4.75v6.5C0 12.216.784 13 1.75 13h7.5A1.75 1.75 0 0011 11.25v-.675l3.864 2.318A.75.75 0 0016 12.25v-8.5zm-5 5.075l3.5 2.1v-5.85l-3.5 2.1v1.65zM9.5 6.75v-2a.25.25 0 00-.25-.25h-7.5a.25.25 0 00-.25.25v6.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-4.5z"></path>
</svg><span aria-label="Video description Format to Multiple Lines">Format to Multiple Lines</span><span class="dropdown-caret"></span>
</summary>
<video muted controls style="max-height:640px;" src="https://github.com/user-attachments/assets/bcee662f-4213-41f8-befe-daa3b315b31e?title=Format+to+Multiple+Lines&rehype=video"></video>
</details>
<h3 id="-move-a-line-or-multiple-lines-of-code-updown"><a aria-hidden="true" tabindex="-1" href="#-move-a-line-or-multiple-lines-of-code-updown" class="anchor"><span class="icon icon-link"></span></a>💡 Move a line or multiple lines of code up/down</h3>
<p>Move selected multiple lines of code or the line where the cursor is located. Move code up: <kbd>Cmd</kbd> + <kbd>Option</kbd> + <kbd>[</kbd>, Move code down: <kbd>Cmd</kbd> + <kbd>Option</kbd> + <kbd>]</kbd></p>
<details open class="octicon octicon-video">
<summary>
<svg aria-hidden="" height="16" width="16" viewBox="0 0 16 16" version="1.1" data-view-component="" class="octicon octicon-device-camera-video">
<path fill-rule="evenodd" d="M16 3.75a.75.75 0 00-1.136-.643L11 5.425V4.75A1.75 1.75 0 009.25 3h-7.5A1.75 1.75 0 000 4.75v6.5C0 12.216.784 13 1.75 13h7.5A1.75 1.75 0 0011 11.25v-.675l3.864 2.318A.75.75 0 0016 12.25v-8.5zm-5 5.075l3.5 2.1v-5.85l-3.5 2.1v1.65zM9.5 6.75v-2a.25.25 0 00-.25-.25h-7.5a.25.25 0 00-.25.25v6.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-4.5z"></path>
</svg><span aria-label="Video description Move a line or multiple lines of code">Move a line or multiple lines of code</span><span class="dropdown-caret"></span>
</summary>
<video muted controls style="max-height:640px;" src="https://github.com/user-attachments/assets/c27fd9ac-c1f2-4270-82b2-c43f8dc8def5?title=Move+a+line+or+multiple+lines+of+code&rehype=video"></video>
</details>
</markdown-style>
</div>
<script src="js/demo-preview.js?v=1.34.1"></script>
<div class="footer warpper" style="max-width:720px;">
<a href="https://wangchujiang.com/#/projects" target="_blank">Projects</a> •
<a href="https://wangchujiang.com/#/sponsor" target="_blank">Sponsor</a> •
<a href="https://wangchujiang.com/#/app" target="_blank">More Apps</a><br><br>Generated by <a href="https://github.com/jaywcjlove/idoc" target="_blank">idoc</a> v1.34.1
</div>
<script src="js/tocbot.js?v=1.34.1"></script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。