This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIGraphicsBeginImageContext(self.view.bounds.size); | |
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; | |
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
CGRect rect = CGRectMake(250,61 ,410, 255); | |
CGImageRef imageRef = CGImageCreateWithImageInRect([viewImage CGImage], rect); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps aux | grep node | |
kill -9 PID | |
(Replace PID with the process Id of the Node) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.edgesForExtendedLayout = UIRectEdgeNone; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIImagePickerController * picker = [[UIImagePickerController alloc] init]; | |
[picker setDelegate:self]; | |
[picker setAllowsEditing:YES]; | |
[picker setSourceType: UIImagePickerControllerSourceTypeSavedPhotosAlbum]; | |
[picker setModalTransitionStyle:UIModalTransitionStyleCrossDissolve]; | |
[self presentViewController:picker animated:YES completion:^{ NSLog(@"We got something back from picking an Image");}]; | |
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info | |
{ | |
[picker dismissViewControllerAnimated:YES completion:nil]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIImage *img = [UIImage imageNamed:@"background.png"]; | |
UIGraphicsBeginImageContext(img.size); | |
[[UIImage imageNamed:@"background.png"] drawInRect:CGRectMake(0, 0, img.size.width, img.size.height)]; | |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
[[self view] setBackgroundColor:[UIColor colorWithPatternImage:image]]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[[cell imageView] layer] setMasksToBounds:YES]; | |
[[[cell imageView] layer] setCornerRadius:49.0]; | |
[[[cell imageView] layer] setBorderColor: [[UIColor whiteColor] CGColor]]; | |
[[[cell imageView] layer] setBorderWidth: 2.0]; | |
This takes a image cell, creates a circle based on an image that is 98 points | |
Change [cell imageView] to be object of UIView. | |
radius changes how round the edges are | |
Width changes the thickness of the border. -exclude to have no border. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rebase -i origin/master~4 master | |
git push origin +master //forces a push after doing a rebase | |
git push origin --delete <branch> //Removes branch from origin | |
git branch -d <branch> //Removes branch from local | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TweetbotViewController.m | |
// testingTweetbotCell | |
// | |
// Created by Niels Hansen on 12-12-04. | |
// Copyright (c) 2012 Niels Hansen. All rights reserved. | |
// | |
#import "TweetbotViewController.h" | |
#import "TweetbotInfoCell.h" |