This file contains 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
func commonSuperviews(between lhs: UIView, and rhs: UIView) -> [UIView] { | |
func getSuperviews(for view: UIView) -> [UIView] { | |
guard let superview = view.superview else { | |
return [] | |
} | |
return [superview] + getSuperviews(for: superview) |
This file contains 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 bash | |
<% for type in types.classes { -%> | |
<%_ if type.attributes["final"] != nil || type.attributes["open"] != nil || types.based[type.name]?.isEmpty == false { continue } -%> | |
<%_ _%>git grep -lz 'class <%= type.name %>' | xargs -0 perl -i'' -pE "s/class <%= type.name %>(?=\s|:)/final class <%= type.name %>/g" | |
<% } %> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>HKAtrialFibrillationDetectionOnboardingCompleted</key> | |
<integer>1</integer> | |
<key>HKElectrocardiogramOnboardingCompleted</key> | |
<integer>3</integer> | |
</dict> | |
</plist> |
This file contains 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
class FirebaseCoordinator { | |
static let shared = FirebaseCoordinator() | |
static let initialize: Void = { | |
/// We modify Google Firebase (and eventually Analytics) to load the mac-specific plist at runtime. | |
/// Google enforces that we have a file named "GoogleService-Info.plist" in the app resources. | |
/// This is unfortunate since we need two different files based on iOS and Mac version | |
/// One solution is a custom build step that copies in the correct file: | |
/// https://stackoverflow.com/questions/37615405/use-different-googleservice-info-plist-for-different-build-schemes | |
/// However, this is basically impossible since Catalyst doesn't set any custom build variables, so detection is extremely difficult. | |
/// We swizzle to modify the loading times. |
This file contains 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
Question set for interviews | |
Developer | |
Tech | |
- [ ] How many projects do you have | |
- [ ] Which architectures approaches do you use | |
- [ ] Which swift version / legacy objc, c what are you going to do with it. | |
- [ ] Do you do layout in xibs or in code? | |
- [ ] What do you think about reactive programming (RxSwift) |
This file contains 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 bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
OlderNewer