Skip to content

Instantly share code, notes, and snippets.

#########################
# .gitignore file for Xcode5
#
# NB: if you are storing "built" products, this WILL NOT WORK,
# and you should use a different .gitignore (or none at all)
# This file is for SOURCE projects, where there are many extra
# files that we want to exclude
#
# For updates, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
# and https://gist.github.com/adamgit/3786883
@r3econ
r3econ / UIButton+VerticalLayout.h
Last active May 14, 2020 01:30
UIButton category for centering title label and image vertically. The text label is placed below the image.
@interface UIButton (VerticalLayout)
- (void)centerVerticallyWithPadding:(float)padding;
- (void)centerVertically;
@end
@ruandao
ruandao / ios
Last active January 22, 2016 09:56
用来处理 uitextview 编辑时,键盘挡住输入框的, 这个会将整个frame 上移
// 注意,如果输入的是汉字的话,输入拼音后,会出现新的一行,让你选择拼音所对应的汉字,这个也会触发UIKeyboardWillShowNotification
// 所以,你要加个变量,来判断键盘是否消失,没消失的话就不在上移界面
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillShow:)
@mmorey
mmorey / .gitignore
Last active November 9, 2018 16:20 — forked from adamgit/.gitignore
.gitignore file for Xcode5
#########################
# .gitignore file for Xcode5
#
# NB: if you are storing "built" products, this WILL NOT WORK,
# and you should use a different .gitignore (or none at all)
# This file is for SOURCE projects, where there are many extra
# files that we want to exclude
#
# For updates, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
# and https://gist.github.com/adamgit/3786883