Skip to content

Instantly share code, notes, and snippets.

View wavecos's full-sized avatar

Jose Alfredo Arias S. wavecos

View GitHub Profile
@wavecos
wavecos / gist:9102074
Created February 19, 2014 21:32
Add Parallax Effect to View
-(void) backgroundParallaxEffect {
// Set vertical effect
UIInterpolatingMotionEffect *verticalMotionEffect =
[[UIInterpolatingMotionEffect alloc]
initWithKeyPath:@"center.y"
type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis];
verticalMotionEffect.minimumRelativeValue = @(-10);
verticalMotionEffect.maximumRelativeValue = @(10);
// Set horizontal effect
@wavecos
wavecos / gist:11222159
Last active August 29, 2015 14:00
lesly-carlos
- (void)viewDidLoad
{
[super viewDidLoad];
matchQueue = dispatch_queue_create("com.nuevatel.WorldCupApp", NULL);
dispatch_async(matchQueue, ^{
DashBoardResponse *dash = [WSManager getDashBoard];
});
@wavecos
wavecos / gist:2594bceaa510d0ed2357
Created August 22, 2014 15:52
for RESideMenu, to avoid background red color
self.contentViewController.view.superview.backgroundColor = [UIColor clearColor];
@wavecos
wavecos / gist:d18c695832b042e0e498
Created August 22, 2014 15:56
Hide the BottomBar (TabBar) when Push a Controller
destinationController.hidesBottomBarWhenPushed = YES;
@wavecos
wavecos / gist:be448c941472015a6a6f
Created August 25, 2014 02:47
Hide the title for Back Button in Navigation Controller
// Hide the title for Back Button in Navigation Controller
self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
@wavecos
wavecos / gist:27b8b579c219fe7e781d
Last active September 12, 2016 15:07
Custom Back Bar Button (without title) for navigation bar, called from parent
let btnBack = UIBarButtonItem(title: "", style: .Plain, target: self, action: nil)
self.navigationController?.navigationBar.topItem?.backBarButtonItem = btnBack
@wavecos
wavecos / gist:9147d4627e3af5c9f9bf
Last active February 14, 2021 23:25
Change NavigationBar title without self.title
self.navigationController.navigationBar.topItem.title = _venue.name;
@wavecos
wavecos / gist:9834c046fb7aeb608288
Created November 11, 2014 15:24
Get the version name for Ubuntu Linux
cat /etc/issue
@wavecos
wavecos / gist:4dcb1410a41b9dd521cb
Created January 28, 2015 23:13
Present Modal ViewController when tap a TabBarItem (like camera VC in Instagram)
// 1. First Create a Dummy UIViewController that has a root relation with the UITabBarController
// 2. Make this controller implement a UITabBarControllerDelegate
// 3. In ViewDidLoad:
override func viewDidLoad() {
super.viewDidLoad()
self.tabBarController?.delegate = self
}
// 4. Implement this delegate method:
func tabBarController(tabBarController: UITabBarController, didSelectViewController viewController: UIViewController) {
let isModalTab = viewController == self
@wavecos
wavecos / gist:147a07a310e69412f16c
Created February 2, 2015 01:04
Get File Name from Swift Class (or Objective C class)
NSLog("Filename: " + NSStringFromClass(self.dynamicType))