小众开发者 #Swift #Themes  Docker  Github
< Code is code />
  • iOS Simulators

    Feb 02, 2021

    iOS Simulators How to install Download iOS simulator dmg Copy to ~/Library/Caches/com.apple.dt.Xcode/Downloads/ Click download button in Xcode Components Simulators iOS 14.3 Simulator iOS 14.2 Simulator iOS 14.1 Simulator iOS 14.0 Simulator iOS 13.7 Simulator iOS 13.6 Simulator iOS 13.5 Simulator iOS 13.4 Simulator iOS 13.3 Simulator iOS 13.2 Simulator iOS 13.1 Simulator iOS 13.0 Simulator iOS 12.4 Simulator …

    iOS

  • 优雅的使用 Iconfont

    Jan 11, 2021

    Iconfont 就是把矢量图作为字体,可以很方便的在 App 里显示图标。拥有体积小加载速度快的优点。 推荐两个生成 Iconfont 的网站: 国外的 fontello 国内的 iconfont Fontello 没有自己的资源库,网站提供的素材是第三方的,基本上来自于 Fontelico 和 Font Awesome 。 …

    iOSSwift

  • xcrun 使用说明

    Dec 03, 2020

    xcrun 是 Xcode 的工具链的一部分,一般用来配置编译环境,在跨平台的编译配置上非常有用。 内置的帮助说明非常简洁: Usage: xcrun [options] <tool name> ... arguments ... Find and execute the named command line tool from the active developer directory. The active developer directory can be set using `xcode-select`, or via the DEVELOPER_DIR environment variable. See the xcrun and xcode-select manual pages for more information. Options: -h, --help show this help message and exit --version show the xcrun version -v, --verbose show verbose logging output --sdk <sdk name> find the tool for the given SDK name --toolchain <name> find the tool for the given toolchain -l, --log show commands to be executed (with --run) -f, --find only find and print the tool path -r, --run find and execute the tool (the default behavior) -n, --no-cache do not use the lookup cache -k, --kill-cache invalidate all existing cache entries --show-sdk-path show selected SDK install path --show-sdk-version show selected SDK version --show-sdk-build-version show selected SDK build version --show-sdk-platform-path show selected SDK platform path --show-sdk-platform-version show selected SDK platform version 自动配置 sysroot 编译的时候需要指定 -sysroot=/root/path/to/sdk,include 和 lib 就基于 sysroot 指定的目录里进行查找,如果是在 macOS 上编译 iOS 程序,sysroot 就指向 iOS sdk 的目录。 …

    Xcode

  • macOS 上开启 VIM 的语法高亮功能

    Nov 16, 2020

    macOS 自带的 VIM 默认情况下是没有语法高亮的,编辑文件的时候白茫茫一片,体验非常不好。 手动开启语法高亮,打开终端 Terminal.app: vim ~/.vimrc 加入以下内容: syntax on 保存,再打开 VIM 就有语法高亮了。 …

    macOSVIM

  • 恢复 Xcode 默认设置

    Oct 15, 2020

    一条命令就可以恢复 Xcode 的默认设置: defaults delete com.apple.dt.Xcode

    Xcode

  • Swift 里的 dispatch_once 替代方案

    Sep 27, 2020

    ObjC 里的 dispatch_once 使用起来很方便,但是 Swift 里废弃使用这个方法了,原因是鼓励大家使用 static let 。 …

    Swift

  • 拉取 Github 上的 Pull Request 代码到本地分支

    Sep 19, 2020

    如果在 GitHub 上看到一个好的 PR,作者又没有 Merge ,这个时候比较好的办法是合并到自己的 Fork 里。 …

    Git

  • 创建 Visual Studio C++ 离线安装包

    Sep 15, 2020

    Visual Studio 2015 之后,微软就不再提供 Visual Studio 的 iSO 镜像下载了,而是提供按需下载的模式,如果需要在团队内部分发安装,就需要自己制作离线安装包。 如果你只需要 C++ 的推荐组件和可选组件,语言是简体中文: …

    Visual Studio

  • Swift 的逃逸闭包和非逃逸闭包

    Aug 30, 2020

    Swift 里的闭包(Closure)对应 ObjC 里的代码块(Block)。 众所周知,在闭包里引用外部变量其引用数会递增,但如果是在闭包所在的方法内部立即就执行的,引用数递增是没有必要的。 …

    Swift

  • *** -[UIKeyboardLayoutStar release]: message sent to deallocated instance

    Aug 29, 2020

    项目里使用了 Swizzlling Method 黑魔法来防止 NSArray 越界之类的崩溃。 App 在使用键盘时切换到后台,就会触发一个非法访问的崩溃: *** -[UIKeyboardLayoutStar release]: message sent to deallocated instance ... 去掉黑魔法造成的风险太大了。 解决方法是禁用黑魔法的 ARC,添加编译标志 -fno-objc-arc。 …

    iOS

  • 21
  • 22
  • 23
  • 24
  • 25

©2021 lvvme.

Powered by Hugo & Notepadium ipv6 ready