Skip to content

Instantly share code, notes, and snippets.

@Gaia-Murata
Gaia-Murata / gist:688d99b53f62d79d6795
Last active August 29, 2015 14:01
importより安全で効率的な@import
@Gaia-Murata
Gaia-Murata / mcAnimateBlock.m
Created May 14, 2014 11:17
mcAnimateBlock.m
[NSObject animate:^{
_mcAnimateSampleView.springBounciness = 24.0f;
_mcAnimateSampleView.springSpeed = 10.0f;
_mcAnimateSampleView.spring.pop_scaleXY = CGPointMake(2.f, 2.f);
} completion:^(BOOL finished) {
//ScaleAnimation実行後にX軸で回転を加える
_mcAnimateSampleView.layer.pop_duration = 4;
_mcAnimateSampleView.layer.easeInEaseOut.pop_rotationX = 60.0f;
}];
@Gaia-Murata
Gaia-Murata / mcAnimate.m
Created May 14, 2014 11:14
mcAnimate.m
_sampleView.springBounciness = 24.0f;
_sampleView.springSpeed = 5.0f;
_sampleView.spring.bounds= CGRectMake(0, 0, 200, 200);
@Gaia-Murata
Gaia-Murata / notMcAnimate.m
Last active August 29, 2015 14:01
notMcAnimate.m
POPSpringAnimation *anim =
[POPSpringAnimation animationWithPropertyNamed:kPOPLayerBounds];
anim.toValue = [NSValue valueWithCGRect:CGRectMake(0, 0, 200, 200)];
anim.springSpeed = 5.0f;
anim.springBounciness = 24.0f;
[_sampleView pop_addAnimation:anim forKey:@"size"];
@Gaia-Murata
Gaia-Murata / customProperty.m
Last active August 29, 2015 14:01
customProperty.m
POPAnimatableProperty *countProperty =
[POPAnimatableProperty propertyWithName:@"countUp"
initializer:^(POPMutableAnimatableProperty *prop){
prop.readBlock = ^(UILabel *label, CGFloat values[]) {
//どの値を利用するか
values[0] = [label.text intValue];
};
prop.writeBlock = ^(UILabel *label, const CGFloat values[]) {
//変更した値をどこに更新するか
label.text = [[NSString alloc] initWithFormat:@"%d", (int)values[0]];
@Gaia-Murata
Gaia-Murata / DecayAnimation.m
Last active August 29, 2015 14:01
DecayAnimation.m
POPDecayAnimation *animX =
[POPDecayAnimation animationWithPropertyNamed:kPOPLayerPositionX];
animX.velocity = @(100.0f);
[_decaySampleView.layer pop_addAnimation:animX forKey:@"slideX"];
POPDecayAnimation *animY =
[POPDecayAnimation animationWithPropertyNamed:kPOPLayerPositionY];
animY.velocity = @(100.0f);
[_decaySampleView.layer pop_addAnimation:animY forKey:@"slideY"];
@Gaia-Murata
Gaia-Murata / SpringAnimation.m
Last active August 29, 2015 14:01
SpringAnimation.m
POPSpringAnimation *anim =
[POPSpringAnimation animationWithPropertyNamed:kPOPLayerBounds];
anim.toValue = [NSValue valueWithCGRect:CGRectMake(0, 0, 200, 200)];
anim.springSpeed = 5.0f;
anim.springBounciness = 24.0f;
[_sampleView pop_addAnimation:anim forKey:@"size"];
@Gaia-Murata
Gaia-Murata / BasicAnimation.m
Last active August 29, 2015 14:01
BasicAnimation.m
POPBasicAnimation *anim =
[POPBasicAnimation animationWithPropertyNamed:kPOPViewAlpha];
anim.timingFunction =
[CAMediaTimingFunction functionWithName:
kCAMediaTimingFunctionEaseInEaseOut];
anim.duration = 3.0f;
anim.fromValue = @(0.0);
anim.toValue = @(1.0);
[_basicSampleView pop_addAnimation:anim forKey:@"fade"];
@Gaia-Murata
Gaia-Murata / BasicAnimation.m
Created May 14, 2014 10:48
SpringAnimation
POPBasicAnimation *anim = [POPBasicAnimation animationWithPropertyNamed:kPOPViewAlpha];
anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
anim.duration = 3.0f;
anim.fromValue = @(0.0);
anim.toValue = @(1.0);
[_basicSampleView pop_addAnimation:anim forKey:@"fade"];
@Gaia-Murata
Gaia-Murata / gist:8023414
Last active December 31, 2015 17:58
「iOSアプリを作りたいと思っているあなたへ、30分でアプリをつくろうと思いましたが、1日かかりました」#vgadgent2013

iOSアプリを作りたいと思っているあなたへ、30分で作れそうなアプリを考えてみる。 このタイトルは嘘になってしまったみたいです。本当は ##iOSアプリを作りたいと思っているあなたへ、30分でアプリをつくろうと思いましたが、1日かかりました

この記事はVOYAGE GROUP エンジニアブログ : Advent Calendar 2013の18日目の記事になります。

皆さんGistでこんにちは! @jet_mmmです、通称ガイアです。

Macを持ってる誰しもが、iosアプリ作りたいなと思ったことは1度でもあるのでは無いでしょうか?