Uploaded by backwardselvis on May 14, 2009
This is a demo of two methods
- (void)shifty { NSLog(@"shifty: Method - FIRED");
CGRect rect = self.centerView.frame;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationRepeatCount:4];
[UIView setAnimationDuration:0.1]; //TODO: I want to store the x/y values
// and set the frame back to the original state
// when finished. Currently i think they are just
// pointers so the values get erased.
//int rectY = rect.origin.y;
//int rectX = rect.origin.x; if (!shiftyBOOL) { shiftyBOOL = TRUE; rect.origin.x -= kShifty_Offset; //rect.origin.y += kShifty_Offset; NSLog(@"%d,%d",rect.origin.x,rect.origin.y);
} else { shiftyBOOL = FALSE; rect.origin.x += kShifty_Offset; //rect.origin.y -= kShifty_Offset; NSLog(@"%d,%d",rect.origin.x,rect.origin.y);
} self.centerView.frame = rect;
[UIView commitAnimations]; //After values are set, this calls the animation
//TODO
//rect.origin.y = rectY;
//rect.origin.x = rectX;
}
- (void)pulse:(UIColor *)color {
NSLog(@"pulse: - FIRED!");
CGRect rect = CGRectMake(0.0, 0.0, 320.0, 480.0);
UIView *aView = [[UIView alloc] initWithFrame:rect];
aView.backgroundColor = color;
[self insertSubview:aView atIndex:0];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.4];
aView.alpha = 0.0;
//aView.frame = CGRectMake(0.0,0.0,320.0,480.0);
[UIView commitAnimations];
[aView release];
}
Category:
Tags:
License:
Standard YouTube License
-
0 likes, 0 dislikes
0:46
Explorer Mobile Application - CoverFlow Viewby ExplorerMobileApp322 views
0:22
GL Transition Demoby CVertex787 views
9:14
How to program in Objective-C (Tutorial)by ipodtouchcoder6,116 views
7:35
XCode iPhone SDK Tutorial: CGRectIntersectsRect/UIImageView Collisionby CathyDirector18,943 views
6:49
iPhone SDK - Switching viewsby thinkaboutitadam7,337 views
5:07
AGW PRIMEIRA PARTE 1/2by py4mab1,002 views
4:28
Creating custom a UITableViewCell with Interface Builderby JulioEBarros45,645 views
7:37
iPhone Programming - Fade In & Out a UIImageViewby MilmersXcode1,672 views
1:56
iPad custom carousel view 100% UIKitby karnlund2,232 views
9:19
iPhone SDK: Info Button switching Viewsby antman8728,445 views
9:57
日本語でiPhoneアプリ開発初級1(カウンターアプリ1/2)by kandabako5,615 views
1:16
Laser Switch Version 1.20 Trailer for iOS 4.0+by ThisIsChrisOxley2,451 views
4:20
iPhone SDK Tutorial: Changing The Background Colorby MacIsTheGeek3,790 views
0:09
Google Maps Iphoneby moises91677506 views
0:33
CalQu Unit Converter iPhone App with two Views for Portrait and Landscape modes with Color Barsby frankguillenbuzz131 views
0:21
iPhone sdk demo 001by mypontan92 views
7:08
iPhone Animation Programming Tutorialby carterfuel3,078 views
0:19
Simple iPhone Credits Screen With Core Animationby dermdaly2,108 views
5:42
XCode iPhone Tutorial - Animating UIImageView with NSArrayby NWorksDev21,440 views
0:06
Basic iOS animationby tysonlesliedesign728 views
- Loading more suggestions...
Link to this comment:
All Comments (0)