Skip to content

Instantly share code, notes, and snippets.

View bergusman's full-sized avatar
:octocat:
Hard working

Vitaly Berg bergusman

:octocat:
Hard working
View GitHub Profile
@bergusman
bergusman / README.md
Last active November 16, 2022 00:38
Keychain
@bergusman
bergusman / README.md
Last active September 6, 2021 14:23
The Internet Date/Time Format (RFC 3339) with JSON
//
// Models.swift
// Vitaly Berg
//
// Created by Vitaly Berg on 7/21/21.
// Copyright © 2021 Vitaly Berg. All rights reserved.
//
import Foundation
import UserNotifications
@bergusman
bergusman / KeyboardObserver.swift
Created July 26, 2021 04:42
Keyboard Observer
//
// KeyboardObserver.swift
// Vitaly Berg
//
// Created by Vitaly Berg on 7/21/21.
// Copyright © 2021 Vitaly Berg. All rights reserved.
//
import UIKit
@bergusman
bergusman / AppDelegate.swift
Created July 22, 2021 10:57
iOS Application UIViewController's hierarchy monitor
import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
private func setupWindow() {
window = UIWindow(frame: UIScreen.main.bounds)
window?.makeKeyAndVisible()
}
Render 1 Render 2 State Preserved?
<>...</> <>{[...]}</> yes (in any level)
<><>...</></> <>...</> no
[...] [[...]] no
[<>...</>]* [...] no
[<>...</>]* <>...</> no
[<>...</>]* <>[...]</> no
[<>...</>]* [[...]] yes
[&lt;&gt;...&gt;]* &lt;&gt;&lt;&gt;...&gt;&gt; yes
@ChrisXu
ChrisXu / .travis.yml
Last active January 16, 2019 22:14
Deploy an app automatically to Fabric Beta using Travis-CI.
language: objective-c
osx_image: xcode7.2
xcode_sdk: iphonesimulator9.2
env:
global:
- LANG=en_US.UTF-8
- WORKSPACE="YOUR_APP_WORKSPACE/YOUR_APP_PROJECT.xcworkspace"
- SCHEME="YOUR_BUILDSCHEME"
- APP_NAME="YOUR_APP_NAME"
MAIN_GOPATH=/usr/local/Cellar/go/1.2/workspace
export GOPATH=$MAIN_GOPATH
MAIN_PATH=$PATH:$GOPATH/bin
export PATH=$MAIN_PATH
# goenv functions
activate(){
export GOPATH="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)"
export OLDPS1=$PS1
export PS1="(go:$(basename $GOPATH)) $PS1"
@johanneswuerbach
johanneswuerbach / .travis.yml
Last active May 14, 2024 03:50
Deploy an iOS app to testflight using Travis CI
---
language: objective-c
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
env:
global:
@mattt
mattt / uiappearance-selector.md
Last active September 24, 2024 12:59
A list of methods and properties conforming to `UIAppearance` as of iOS 12 Beta 3

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./*     | \
  sed 's/NS_AVAILABLE_IOS(.*)//g'     | \
  sed 's/NS_DEPRECATED_IOS(.*)//g'    | \
  sed 's/API_AVAILABLE(.*)//g'        | \
  sed 's/API_UNAVAILABLE(.*)//g'      | \
 sed 's/UI_APPEARANCE_SELECTOR//g' | \