Skip to content

Instantly share code, notes, and snippets.

View icodebuster's full-sized avatar
💭
I may be slow to respond.

Jobin Kurian icodebuster

💭
I may be slow to respond.
View GitHub Profile

UIStatusBarStyle in iOS 7

  • The status bar in iOS 7 is transparent, the view behind it shows through.

  • The style of the status bar refers to the appearances of its content. In iOS 7, the status bar content is either dark (UIStatusBarStyleDefault) or light (UIStatusBarStyleLightContent). Both UIStatusBarStyleBlackTranslucent and UIStatusBarStyleBlackOpaque are deprecated in iOS 7.0. Use UIStatusBarStyleLightContent instead.

How to change UIStatusBarStyle

  • If below the status bar is a navigation bar, the status bar style will be adjusted to match the navigation bar style (UINavigationBar.barStyle):
.twitter-typeahead .tt-query,
.twitter-typeahead .tt-hint {
margin-bottom: 0;
}
.tt-hint {
display: block;
width: 100%;
height: 38px;
padding: 8px 12px;
font-size: 14px;
- (UIViewController *)topViewController{
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController];
}
- (UIViewController *)topViewController:(UIViewController *)rootViewController
{
if (rootViewController.presentedViewController == nil) {
return rootViewController;
}
@icodebuster
icodebuster / NSArrayMagic.m
Created December 1, 2015 16:01 — forked from jarsen/NSArrayMagic.m
How to do lots of cool things with NSArray. Inspired by NSHipster and WWDC 2013 Session 228 - "Hidden Gems in Cocoa and Cocoa Touch"
NSArray *albums = @[[Album albumWithName:@"Random Access Memories" price:9.99f],
[Album albumWithName:@"Clarity" price:6.99f],
[Album albumWithName:@"Weekend in America" price:7.99f],
[Album albumWithName:@"Weekend in America" price:7.90f],
[Album albumWithName:@"Bangarang EP" price:2.99f]];
// Reversing an Array
__unused NSArray *reversed = albums.reverseObjectEnumerator.allObjects;
// PREDICATES
@icodebuster
icodebuster / 01_Laravel 5 Simple ACL manager_Readme.md
Created July 13, 2016 20:47 — forked from amochohan/01_Laravel 5 Simple ACL manager_Readme.md
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php

@icodebuster
icodebuster / Sublime Text 3 Build 3103 License Key - CRACK
Created August 10, 2016 06:57
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@icodebuster
icodebuster / xc
Created August 20, 2016 08:02 — forked from subdigital/xc
Open the first Xcode workspace or project found
xcode_proj=`find . -name "*.xc*" -d 1 | sort -r | head -1`
if [ `echo -n $xcode_proj | wc -m` == 0 ]
then
echo "No xcworkspace/xcodeproj file found in the current directory."
exit 1
fi
echo "Found $xcode_proj"
open $xcode_proj
@icodebuster
icodebuster / vhost.py
Created August 26, 2016 09:06 — forked from fideloper/vhost.py
Create vHost Ubuntu Lamp-Server (bash and python)
#! /usr/bin/python
from sys import argv
from os.path import exists
from os import makedirs
from os import symlink
from os import system
import getopt
#
@icodebuster
icodebuster / response.php
Created October 4, 2016 06:41 — forked from Sentences/response.php
Laravel Response extend for inline displaying of images
<?php
use Laravel\File;
/**
* Put this in laravels libraries dir and make sure to
* remove Response in /config/application.php
* This file will be autoloaded by default.
*
* @author Nico R <lt500r@gmail.com>
*/
class Response extends \Laravel\Response