Skip to content

Instantly share code, notes, and snippets.

- (void)setExtraCellLineHidden: (UITableView *)tableView
{
UIView *view =[ [UIView alloc]init];
view.backgroundColor = [UIColor clearColor];
[tableView setTableFooterView:view];
[view release];
}
@flashlib
flashlib / 改变UITableViewCell选中时背景色
Created September 30, 2013 07:45
改变UITableViewCell选中时背景色
cell.selectedBackgroundView = [[[UIView alloc] initWithFrame:cell.frame] autorelease];
cell.selectedBackgroundView.backgroundColor = [UIColor xxxxxx];
@flashlib
flashlib / 隐藏UITableView多余的分割线
Created September 30, 2013 07:48
其实就是设置一个透明的footerView,这样空的cell就不会显示出来。
- (void)setExtraCellLineHidden: (UITableView *)tableView
{
UIView *view =[ [UIView alloc]init];
view.backgroundColor = [UIColor clearColor];
[tableView setTableFooterView:view];
[view release];
}
+ (CGFloat)heightOfComment:(NSString *)comment {
UILabel *label = PrototypeCell.commentLabel;
// NOTE: The height of the comment should always be at least the height of
// one line of text.
if (comment.length == 0)
comment = @" ";
return [comment sizeWithFont:label.font
constrainedToSize:label.frame.size
version=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $PRODUCT_SETTINGS_PATH`
version=`expr $version + 1`
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $version" $PRODUCT_SETTINGS_PATH
#/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $version" $PRODUCT_SETTINGS_PATH 这行代码会让version也自增,一般不需要
@flashlib
flashlib / git回退remote上的版本至指定提交版本.sh
Created October 24, 2013 06:37
$ Where git interprets x^ as the parent of x and + as a forced non-fastforward push.
$ git push mathnet +dd61ab32^:master
@flashlib
flashlib / 查找FirstResponder
Created November 8, 2013 06:53
查找当前处于激活编辑状态的视图
@implementation UIView (FindFirstResponder)
- (UIView *)findFirstResponder
{
if (self.isFirstResponder) {
return self;
}
for (UIView *subView in self.subviews) {
UIView *firstResponder = [subView findFirstResponder];
platforms/
plugins/
//
// UIImage+Autoresize.h
// UIImage+Autoresize
//
// Created by kevin delord on 24/04/14.
// Copyright (c) 2014 Kevin Delord. All rights reserved.
//
#ifndef UIImage_Autoresize_h__
#define UIImage_Autoresize_h__
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)