Skip to content

Instantly share code, notes, and snippets.

View srongch's full-sized avatar

Sronglong srongch

View GitHub Profile
@srongch
srongch / gist:b769fc3572d3dda9592359075caae636
Created March 22, 2019 10:51 — forked from snikch/gist:3661188
Find the current top view controller for your iOS application
- (UIViewController *)topViewController{
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController];
}
- (UIViewController *)topViewController:(UIViewController *)rootViewController
{
if (rootViewController.presentedViewController == nil) {
return rootViewController;
}
@srongch
srongch / UploadService.swift
Created March 17, 2019 16:31
Firebase Database Multiple upload
import Foundation
import Firebase
final class ClassService {
// MARK: - Firebase Storage Reference
let PHOTO_STORAGE_REF: StorageReference = Storage.storage().reference().child("photos")
init (){}
@srongch
srongch / ANYAppStoryboard.h
Last active March 28, 2018 09:13
Clean Code for Multiple Storyboards : Objective-c Version of https://gist.github.com/Gurdeep0602/4fc3892c1b2861d4cd2062ddfddf3262
//
// ANYTabDefaultViewController.m
// AnyPay
//
// Created by Chhem Sronglong on 07/03/2018.
// Copyright © 2018 Things9. All rights reserved.
//
#import <Foundation/Foundation.h>