Skip to content

Instantly share code, notes, and snippets.

View Bayonetta's full-sized avatar
🎯
Focusing

Bayonetta Bayonetta

🎯
Focusing
  • Nomi
View GitHub Profile
@Bayonetta
Bayonetta / PresentationVC.m
Last active January 2, 2016 13:29
弹出全透明ViewController
//Only work in iPad, because the modalPresentationStyle default value is UIModalPresentationFullScreen in iPhone
UIViewController* controller = self.view.window.rootViewController;
CustomUIViewController *presentationController = [[CustomUIViewController alloc]init];
controller.modalPresentationStyle = UIModalPresentationCurrentContext;
[controller presentViewController:presentationController animated:NO completion:^{}];
@Bayonetta
Bayonetta / addChildVC.m
Last active January 2, 2016 13:49 — forked from tomohisa/gist:2897676
添加子VC
// add child view
UIViewController* controller = [self.storyboard instantiateViewControllerWithIdentifier:@"test"];
[self addChildViewController:controller];
controller.view.frame = CGRectMake(0, 44, 320, 320);
[self.view addSubview:controller.view];
[controller didMoveToParentViewController:self];
// remove child view
UIViewController *vc = [self.childViewControllers lastObject];
[vc.view removeFromSuperview];
@Bayonetta
Bayonetta / query.m
Last active January 3, 2016 05:19
Querying the iOS System for Filters.
NSArray *properties = [CIFilter filterNamesInCategory:kCICategoryBuiltIn];
NSLog(@"%@", properties);
for (NSString *filterName in properties) {
CIFilter *fltr = [CIFilter filterWithName:filterName];
NSLog(@"%@", [fltr attributes]);
}
@Bayonetta
Bayonetta / gist:8430088
Created January 15, 2014 03:09
星球大战字符版
telnet towel.blinkenlights.nl
@Bayonetta
Bayonetta / reset.sh
Created January 23, 2014 09:44
Reset all the information about author & committer in your repo git log.
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "XXX@XX.com" ]
then
cn="XXX"
@Bayonetta
Bayonetta / customProgressview.m
Created February 8, 2014 08:02
Custom System UIProgressView
//modify UIProgressview Height
//remember import CoreGraphics.framework
CGAffineTransform transform = CGAffineTransformMakeScale(1.0f, 3.0f);
progressView.transform = transform;
@Bayonetta
Bayonetta / customCorner.m
Created February 8, 2014 08:07
add cornerRadius
//kindofClass:view must be UIView or subclass of UIView
UIView *view = [[UIView alloc]init];
view.layer.masksToBounds = YES;
view.layer.cornerRadius = 5;
原帖地址: http://topic.csdn.net/u/20110113/19/b0d5d506-4307-428b-a61d-7974aa66a2da.html
首先要说明的是:这里介绍的方法都是大部分是本人“悟”出来的,所以网上难有流传!
好方法不能自己私藏,否则就白忙乎这几天了,分享给有需要的朋友们。如果有转载,敬请注明来自*CSDN老邓*作品。
呵呵,给自己打广告,实在是无耻之极,权当无聊之时打字之用。
欢迎流传,为最优秀的分布式版本管理系统Git做宣传!!
步骤:
1. 下载:http://loaden.googlecode.com/files/gitconfig.7z
2. 解压到:<MsysGit安装目录>/cmd/,例如:D:\Program Files\Git\cmd
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)
@Bayonetta
Bayonetta / passThroughView.m
Created March 19, 2014 07:43
Passing through touches to UIViews underneath
UIView *view = [UIView alloc]init];
view.userInteractionEnabled = NO;