This file contains hidden or 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
if (recognizer.state == UIGestureRecognizerStateEnded) { | |
CGPoint velocity = [recognizer velocityInView:self.view]; | |
CGFloat magnitude = sqrtf((velocity.x * velocity.x) + (velocity.y * velocity.y)); | |
CGFloat slideMult = magnitude / 200; | |
NSLog(@"magnitude: %f, slideMult: %f", magnitude, slideMult); | |
float slideFactor = 0.1 * slideMult; // Increase for more of a slide | |
CGPoint finalPoint = CGPointMake(recognizer.view.center.x + (velocity.x * slideFactor), | |
recognizer.view.center.y + (velocity.y * slideFactor)); |
This file contains hidden or 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
source 'http://rubygems.org' | |
gem 'rails', '3.2.x' | |
# Gems used only for assets and not required | |
# in production environments by default. | |
group :assets do | |
gem 'sass-rails', "3.2.5" | |
gem 'coffee-rails', "3.2.2" | |
gem 'uglifier', '1.2.4' |
This file contains hidden or 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
- (BOOL)isMobileNumber:(NSString *)mobileNum | |
{ | |
/** | |
* 手机号码 | |
* 移动:134[0-8],135,136,137,138,139,150,151,157,158,159,182,187,188 | |
* 联通:130,131,132,152,155,156,185,186 | |
* 电信:133,1349,153,180,189 | |
*/ | |
NSString * MOBILE = @"^1(3[0-9]|5[0-35-9]|8[025-9])\\d{8}$"; | |
/** |
OlderNewer