Skip to content

Instantly share code, notes, and snippets.

View VAndrJ's full-sized avatar

VAndrJ VAndrJ

  • Ukraine
  • 18:44 (UTC +03:00)
View GitHub Profile
@VAndrJ
VAndrJ / iOSLogMacros.m
Created August 8, 2019 07:33 — forked from heavenlyfodder/iOSLogMacros.m
Objective-C macros to aid in iOS app debug logging
// mmcneely: From http://stackoverflow.com/questions/969130/nslog-tips-and-tricks
// - DLog prints output to the console, but only if the DEBUG symbol is defined
// - ALog prints output to the console no matter what
// - ULog pops up window on the device (or simulator)
#ifdef DEBUG
# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define DLog(...)
#endif
//
// ArcView.m
// UIBezierPathExampleForLI
//
// Created by Volodymyr Andriienko on 2/23/19.
// Copyright © 2019 VAndrJ. All rights reserved.
//
#import "ArcView.h"
struct TypedIdentifier<T>: Equatable, Codable, ExpressibleByIntegerLiteral, CustomStringConvertible, RawRepresentable {
let rawValue: Int
var description: String {
return "\(rawValue)"
}
init?(rawValue: Int) {
self.rawValue = rawValue
}
@VAndrJ
VAndrJ / NetworkEndpoint.swift
Last active December 4, 2018 14:02
Piece of network module written for Medinternet project.
//
// NetworkEndpoint.swift
// Medinternet
//
// Created by VAndrJ on 6/10/18.
// Copyright © 2018 VAndrJ. All rights reserved.
//
import Foundation
@VAndrJ
VAndrJ / FixedSafeAreaLayoutConstraint.swift
Created July 18, 2018 12:32 — forked from filletofish/FixedSafeAreaLayoutConstraint.swift
Constraint that can be updated with safe area but only once
import UIKit
/// Work around problem described here: https://stackoverflow.com/questions/47223680/safe-area-changes-in-parent-vc-when-presenting-modally-vc-in-landscape
/// When presenting screen with another orientation safe area changes on first screen
/// that affects constraints and all layout that depends on safe area.
/// To avoid this bug one should use UCFixedSafeAreaLayoutConstraint that can be updated with safe
/// area inset using `updateAllFixedSafeAreaConstraints(newSafeAreaInsets:)` in UIViewController
///
///
///
@VAndrJ
VAndrJ / ComposeView.swift
Created March 3, 2018 09:10 — forked from ahbou/ComposeView.swift
iPhone X InputAccessoryView Fix
//
// ComposeView.swift
import UIKit
class ComposeView: UIView {
// ........
// Other layout code and methods
// ........