Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added FadeBackgroundColorInOut example

  • Loading branch information...
commit 733ed9e2cbf810187915399eb219918d26a5d1d6 1 parent cafc297
@neror authored
View
7 Examples/ExampleManager.m
@@ -27,6 +27,7 @@ of this software and associated documentation files (the "Software"), to deal
#import "BackInOut.h"
#import "SlideInOut.h"
#import "FadeInOut.h"
+#import "FadeBackgroundColorInOut.h"
@interface ExampleManager ()
@@ -62,7 +63,11 @@ - (id)init {
groups_ = [[NSArray alloc] initWithObjects:@"Animating Views",
nil];
- samples_ = [[NSArray alloc] initWithObjects:[NSArray arrayWithObjects:[BackInOut class], [SlideInOut class], [FadeInOut class], nil],
+ samples_ = [[NSArray alloc] initWithObjects:[NSArray arrayWithObjects:[BackInOut class],
+ [SlideInOut class],
+ [FadeInOut class],
+ [FadeBackgroundColorInOut class],
+ nil],
nil];
}
return self;
View
31 Examples/FadeBackgroundColorInOut.h
@@ -0,0 +1,31 @@
+/*
+ The MIT License
+
+ Copyright (c) 2009 Free Time Studios and Nathan Eror
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ */
+
+#import "SimpleAnimationExample.h"
+
+
+@interface FadeBackgroundColorInOut : SimpleAnimationExample {
+}
+
+@end
View
49 Examples/FadeBackgroundColorInOut.m
@@ -0,0 +1,49 @@
+/*
+ The MIT License
+
+ Copyright (c) 2009 Free Time Studios and Nathan Eror
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ */
+
+#import "FadeBackgroundColorInOut.h"
+#import "FTAnimation.h"
+
+@implementation FadeBackgroundColorInOut
+
++ (NSString *)displayName {
+ return @"Fade Background Color In/Out";
+}
+
+- (void)viewDidLoad {
+ self.viewToAnimate.image = nil;
+ self.viewToAnimate.backgroundColor = UIColorFromRGBA(0x0000FF, .85);
+ self.viewToAnimate.layer.cornerRadius = 20.;
+}
+
+- (void)performAnimation:(id)sender {
+ if(self.viewToAnimate.hidden) {
+ [self.viewToAnimate fadeBackgroundColorIn:.4 delegate:nil];
+ } else {
+ [self.viewToAnimate fadeBackgroundColorOut:.4 delegate:nil];
+ }
+}
+
+
+@end
View
6 FTUtils.xcodeproj/project.pbxproj
@@ -20,6 +20,7 @@
DF2962F20FE18E0000B9D71D /* FTAnimationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DF2962E90FE18E0000B9D71D /* FTAnimationManager.m */; };
DF3E06A110C71FF7004434C3 /* SlideInOut.m in Sources */ = {isa = PBXBuildFile; fileRef = DF3E06A010C71FF7004434C3 /* SlideInOut.m */; };
DF3E06C610C721E0004434C3 /* FadeInOut.m in Sources */ = {isa = PBXBuildFile; fileRef = DF3E06C510C721E0004434C3 /* FadeInOut.m */; };
+ DF3E06F110C723F0004434C3 /* FadeBackgroundColorInOut.m in Sources */ = {isa = PBXBuildFile; fileRef = DF3E06F010C723F0004434C3 /* FadeBackgroundColorInOut.m */; };
DFA2EA8A10C2AC89003A76FF /* FTUtils+NSObject.m in Sources */ = {isa = PBXBuildFile; fileRef = DFFBF80910ADF405008DB0B9 /* FTUtils+NSObject.m */; };
DFE4EF141035CC4D006A7598 /* OCMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DFE4EF131035CC4D006A7598 /* OCMock.framework */; };
DFE4EF1C1035CC97006A7598 /* OCMock.framework in Copy OCMock */ = {isa = PBXBuildFile; fileRef = DFE4EF131035CC4D006A7598 /* OCMock.framework */; };
@@ -87,6 +88,8 @@
DF3E06A010C71FF7004434C3 /* SlideInOut.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SlideInOut.m; sourceTree = "<group>"; };
DF3E06C410C721E0004434C3 /* FadeInOut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FadeInOut.h; sourceTree = "<group>"; };
DF3E06C510C721E0004434C3 /* FadeInOut.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FadeInOut.m; sourceTree = "<group>"; };
+ DF3E06EF10C723F0004434C3 /* FadeBackgroundColorInOut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FadeBackgroundColorInOut.h; sourceTree = "<group>"; };
+ DF3E06F010C723F0004434C3 /* FadeBackgroundColorInOut.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FadeBackgroundColorInOut.m; sourceTree = "<group>"; };
DF6D06470FE1A6F200CC44C6 /* README.mdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.mdown; sourceTree = "<group>"; };
DFE4EF0B1035CBCB006A7598 /* UnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
DFE4EF0C1035CBCB006A7598 /* UnitTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UnitTests-Info.plist"; sourceTree = "<group>"; };
@@ -267,6 +270,8 @@
DF3E06A010C71FF7004434C3 /* SlideInOut.m */,
DF3E06C410C721E0004434C3 /* FadeInOut.h */,
DF3E06C510C721E0004434C3 /* FadeInOut.m */,
+ DF3E06EF10C723F0004434C3 /* FadeBackgroundColorInOut.h */,
+ DF3E06F010C723F0004434C3 /* FadeBackgroundColorInOut.m */,
);
name = "Simple View Animation";
sourceTree = "<group>";
@@ -446,6 +451,7 @@
DFFDB5E010C2DFB700F7BF95 /* BackInOut.m in Sources */,
DF3E06A110C71FF7004434C3 /* SlideInOut.m in Sources */,
DF3E06C610C721E0004434C3 /* FadeInOut.m in Sources */,
+ DF3E06F110C723F0004434C3 /* FadeBackgroundColorInOut.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Please sign in to comment.
Something went wrong with that request. Please try again.