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
xcodebuild -scheme MyScheme -showBuildSettings | grep ARCHS |
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 *)resizeImage:(UIImage *)image scaledToFitSize:(CGFloat)max | |
{ | |
NSData *imageData = [NSData dataWithData:UIImageJPEGRepresentation(image, 1.0)]; | |
CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)imageData, NULL); | |
if (!imageSource) | |
return nil; | |
CFDictionaryRef options = (__bridge CFDictionaryRef)[NSDictionary dictionaryWithObjectsAndKeys: | |
(id)kCFBooleanTrue, (id)kCGImageSourceCreateThumbnailWithTransform, | |
(id)kCFBooleanTrue, (id)kCGImageSourceCreateThumbnailFromImageIfAbsent, |
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
Pod::Spec.new do |s| | |
s.name = 'SIEvernoteSDK' | |
s.version = '1.0' | |
s.platform = :ios,'5.0' | |
s.license = 'https://github.com/evernote/evernote-sdk-ios/blob/master/LICENSE' | |
s.summary = 'EvernoteSDK改进版' | |
s.homepage = 'https://github.com/vitoziv/evernote-sdk-ios' | |
s.author = { 'Vito Zhang' => 'zhangwei.noair@gmail.com' } | |
s.requires_arc = true | |
s.source = { :git => 'https://github.com/vitoziv/evernote-sdk-ios.git', :tag => '1.2.0' } |
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
# Mac | |
*~ | |
.DS_Store | |
.AppleDouble | |
.LSOverride | |
# Thumbnails | |
._* | |
# Files that might appear on external disk |
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
# OS X | |
.DS_Store | |
# Xcode | |
build/ | |
*.pbxuser | |
!default.pbxuser | |
*.mode1v3 | |
!default.mode1v3 | |
*.mode2v3 |
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
- (NSString *)convertTimeFromSeconds:(NSString *)seconds | |
{ | |
// Return variable. | |
NSString *result = @""; | |
// Int variables for calculation. | |
int secs = [seconds intValue]; | |
// Convert the seconds to hours, minutes and seconds. | |
int tempHour = secs / 3600; |
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
Pod::Spec.new do |s| | |
s.name = 'moves-ios-sdk' | |
s.version = '0.1.0' | |
s.platform = :ios,'6.0' | |
s.license = 'https://github.com/vitoziv/moves-ios-sdk/blob/master/LICENSE' | |
s.summary = 'Moves app iOS SDK ' | |
s.homepage = 'https://github.com/vitoziv/moves-ios-sdk' | |
s.author = { | |
'Vito Zhang' => 'zhangwei.noair@gmail.com' | |
} |
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
NSUInteger DeviceSystemMajorVersion(); | |
NSUInteger DeviceSystemMajorVersion() | |
{ | |
static NSUInteger _deviceSystemMajorVersion = -1; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
_deviceSystemMajorVersion = [[[[[UIDevice currentDevice] systemVersion] componentsSeparatedByString:@"."] objectAtIndex:0] intValue]; | |
}); | |
return _deviceSystemMajorVersion; | |
} |
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 "NoShadowTableView.h" | |
@interface NoShadowTableView () | |
{ | |
// iOS7 | |
__weak UIView* wrapperView; | |
} | |
@end |
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)runSpinAnimationOnView:(UIView*)view duration:(CGFloat)duration rotations:(CGFloat)rotations repeat:(float)repeat; | |
{ | |
CABasicAnimation* rotationAnimation; | |
rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; | |
rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI * 2.0 /* full rotation*/ * rotations * duration ]; | |
rotationAnimation.duration = duration; | |
rotationAnimation.cumulative = YES; | |
rotationAnimation.repeatCount = repeat; | |
[view.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"]; |
OlderNewer