Skip to content

Instantly share code, notes, and snippets.

View kenmux's full-sized avatar

Kenmux Lee kenmux

View GitHub Profile
@kenmux
kenmux / DoublyLinkedList.c
Created May 17, 2017 10:06 — forked from mycodeschool/DoublyLinkedList.c
Doubly Linked List implementation in C
/* Doubly Linked List implementation */
#include<stdio.h>
#include<stdlib.h>
struct Node {
int data;
struct Node* next;
struct Node* prev;
};
@kenmux
kenmux / AppDelegate.m
Created November 19, 2015 13:06 — forked from ishaq/AppDelegate.m
iOS: load main interface programmatically
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
UIStoryboard *mainStoryboard = nil;
BOOL showLogin = NO;
if(showLogin == NO)
{
// mainStoryboard method looks like:
// return [UIStoryboard storyboardWithName:@"Main" bundle:nil];
@kenmux
kenmux / UINavigationBar+CustomHeight.h
Created November 2, 2015 03:27 — forked from maciekish/UINavigationBar+CustomHeight.h
Custom UINavigationBar height working in iOS 7 and 8. To use, find your navigation bar reference and just setHeight:200 etc.
//
// UINavigationBar+CustomHeight.h
//
// Copyright (c) 2014 Maciej Swic
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@kenmux
kenmux / gist:375f2d0cc6fb8d29b9d8
Created October 22, 2015 12:54 — 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;
}