Function | Shortcut |
---|---|
New Tab | ⌘ + T |
Close Tab or Window | ⌘ + W (same as many mac apps) |
Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
Cycle iTerm Windows | ⌘ + backtick (true of all mac apps and works with desktops/mission control) |
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
Static & Dynamic libraries | |
https://www.ca.com/en/blog-developers/dynamic-versus-static-framework-in-ios.html | |
https://stackoverflow.com/a/15331319/3215761 | |
Static library - a unit of code linked at compile time, which does not change. | |
However, iOS static libraries are not allowed to contain images/assets (only code). You can get around this challenge by using a media bundle though. | |
A better, more formal definition can be found on Wikipedia here. | |
Dynamic library - a unit of code and/or assets linked at runtime that may change. | |
However, only Apple is allowed to create dynamic libraries for iOS . You're not allowed to create these, as this will get your app rejected. (See this other SO post for confirmation and reasoning on such). |
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
# generate strings for all swift files (even in nested directories) | |
$ find . -name \*.swift | xargs genstrings -o . | |
# See results | |
$ cat Localizable.strings | |
/* Test */ | |
"This is the test message." = "This is the test message."; | |
$ |
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
protocol Letterable { | |
var name: String { get } | |
} | |
final class LetterManager<T: Letterable> { | |
// MARK : - Publics | |
func getTheFirstLetters(with section: Int) -> String { | |
var allTitles = [String]() |
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
extension CustomStringConvertible { | |
var description : String { | |
var description: String = "" | |
description = "***** \(type(of: self)) *****\n" | |
let selfMirror = Mirror(reflecting: self) | |
for child in selfMirror.children { | |
if let propertyName = child.label { | |
description += "\(propertyName): \(child.value)\n" | |
} | |
} |
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
#!/usr/bin/env ruby | |
require 'fileutils' | |
require 'xcodeproj' | |
unless ARGV.count == 2 | |
puts "Usage: xcode_set_development_region.rb [project] [region]" | |
exit(1) | |
end |
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
- Request your designers a SVG format which include all symbol configurations. Apple has a cool template file for adaptation all the icons that you use. It will save you in a big headache :] | |
- Using scale with SymbolConfigurations is very handy. Your symbols will always be fit regardless from where to use them. Especially you need to consider if you are using custom fonts. | |
- Just provide two images with the same name for iOS13 and bitmap versions for older IOS version. The system will use correct version. | |
- Don’t confuse symbol points sizes and screen point sizes. Symbol points sizes represents typographically and values wouldn’t match with screen point sizes. | |
for your icons, get the regular size first and update to pointSize instead of setting constraints width and height, It would be much more performance and correct way about icons centered. | |
- Prefer horizontal and vertical centering over edge alignment, try to build your layouts smallest element to largest element |
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
#!/bin/bash | |
# update_build_number.sh | |
# Usage: `update_build_number.sh [branch]` | |
# Run this script after the 'Copy Bundle Resources' build phase | |
# Ref: http://tgoode.com/2014/06/05/sensible-way-increment-bundle-version-cfbundleversion-xcode/ | |
branch=${1:-'master'} | |
buildNumber=$(expr $(git rev-list $branch --count) - $(git rev-list HEAD..$branch --count)) | |
echo "Updating build number to $buildNumber using branch '$branch'." |
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
#!/bin/bash | |
echo "Please set an input your tag description, ticket number etc." | |
read TAG_DESCRIPTION | |
# get latest tag number | |
VERSION=`git describe --abbrev=0 --tags` | |
echo "CURRENT VERSION => $VERSION" | |
#replace . with space so can split into an array |
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
#!/bin/bash | |
# Get Tags Latest number, increment and set build and version number | |
echo "Please set an input your tag description, ticket number etc." | |
read TAG_DESCRIPTION | |
# get latest tag number | |
VERSION=`git describe --abbrev=0 --tags` | |
echo "CURRENT VERSION => $VERSION" |