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
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也自增,一般不需要" | |
#From 'http://blog.csdn.net/kafeidev/article/details/8221273' |
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
- (void)awakeFromNib | |
{ | |
[super awakeFromNib]; | |
for (NSLayoutConstraint *cellConstraint in self.constraints) | |
{ | |
[self removeConstraint:cellConstraint]; | |
id firstItem = cellConstraint.firstItem == self ? self.contentView : cellConstraint.firstItem; | |
id seccondItem = cellConstraint.secondItem == self ? self.contentView : cellConstraint.secondItem; |
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
#import <UIKit/UIKit.h> | |
@interface UIView (TLLayout) | |
@property (nonatomic, strong) NSArray *hiddenConstraints; | |
// set hidden and remove any constraints involving this view from its superview | |
- (void)hideAndRemoveConstraints; | |
- (void)showAndRestoreConstraints; |
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
@implementation ATableCell | |
- (void)awakeFromNib{} | |
- (void)startAnimationWithDelay:(CGFloat)delayTime{ | |
_tipView.transform = CGAffineTransformMakeTranslation(SCREENWIDTH, 0); | |
[UIView animateWithDuration:1. delay:delayTime usingSpringWithDamping:0.6 initialSpringVelocity:0 | |
option:0 | |
animations:^{ | |
self.tipView.transform = CGAffineTransformIdentity; | |
} |
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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>F19 to F19</name> | |
<appendix>(F19 to Hyper (ctrl+shift+cmd+opt) + F19 Only, send escape)</appendix> | |
<identifier>private.f192f19_escape</identifier> | |
<autogen> | |
--KeyOverlaidModifier-- | |
KeyCode::F19, | |
KeyCode::COMMAND_L, |
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
extension PHPhotoLibrary { | |
typealias PhotoAsset = PHAsset | |
typealias PhotoAlbum = PHAssetCollection | |
static func saveImage(image: UIImage, albumName: String, completion: (PHAsset?)->()) { | |
if let album = self.findAlbum(albumName) { | |
saveImage(image, album: album, completion: completion) | |
return | |
} |
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 版本数 | |
VERSION_NUMBER=`git rev-list head | sort | wc -l | awk '{print $1}'` | |
#VERSION_HASH=`git rev-list head | head -1` | |
echo $VERSION_NUMBER | |
#echo $VERSION_HASH |
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
import Foundation | |
import Alamofire | |
import RxSwift | |
import RxCocoa | |
protocol ClientProtocol { | |
func request<Response>(_ endpoint: Endpoint<Response>) -> Single<Response> | |
} |
OlderNewer