Skip to content

Instantly share code, notes, and snippets.


Evgeny Mikhaylov medvedzzz

  • Skyeng
  • Omsk, Russia
View GitHub Profile
medvedzzz / AppLaunchCounter.h
Created Apr 14, 2017
iOS application launch counter written on Obj-C
View AppLaunchCounter.h
#import <UIKit/UIKit.h>
@interface AppLaunchCounter : NSObject
+ (BOOL)isFirstLaunch;
+ (NSUInteger)numberOfLaunches;
medvedzzz / UIApplication+VisibleViewControllers.swift
Last active Mar 23, 2017
UIApplication Swift category to add visibleViewControllers property
View UIApplication+VisibleViewControllers.swift
import UIKit
extension UIApplication {
private struct AssociatedObjectsKeys {
static var visibleViewControllersPointers = "UIApplication_visibleViewControllersPointers"
fileprivate var visibleViewControllersPointers: NSPointerArray {
var pointers = objc_getAssociatedObject(self, &AssociatedObjectsKeys.visibleViewControllersPointers) as! NSPointerArray?
medvedzzz / UIApplication+VisibleViewControllers.h
Created Nov 28, 2016
UIApplication Obj-C category to add visibleViewControllers property
View UIApplication+VisibleViewControllers.h
#import <UIKit/UIKit.h>
@interface UIApplication (VisibleViewControllers)
@property (nonatomic, readonly) NSArray<__kindof UIViewController *> *visibleViewControllers;