Skip to content

Commit c96d25d

Browse files
committed
Added pop animation supports.
1 parent eb86563 commit c96d25d

File tree

242 files changed

+19294
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

242 files changed

+19294
-5
lines changed

AXPopoverView.xcodeproj/project.pbxproj

+77
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
01E7EAB11BFB6E3E001176A2 /* AXPopoverView.m in Sources */ = {isa = PBXBuildFile; fileRef = 01E7EAB01BFB6E3E001176A2 /* AXPopoverView.m */; };
1919
01EEF3601C09E31500A24C47 /* test.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 01EEF35F1C09E31500A24C47 /* test.jpg */; };
2020
01EEF3621C0AB01000A24C47 /* AXPopoverView.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 01EEF3611C0AB01000A24C47 /* AXPopoverView.bundle */; };
21+
3C6080D3EEF6F2601265CD0A /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 20572430BAD38A4F958E5A1D /* libPods.a */; };
2122
/* End PBXBuildFile section */
2223

2324
/* Begin PBXFileReference section */
@@ -39,13 +40,17 @@
3940
01E7EAB01BFB6E3E001176A2 /* AXPopoverView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AXPopoverView.m; sourceTree = "<group>"; };
4041
01EEF35F1C09E31500A24C47 /* test.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = test.jpg; sourceTree = "<group>"; };
4142
01EEF3611C0AB01000A24C47 /* AXPopoverView.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = AXPopoverView.bundle; sourceTree = "<group>"; };
43+
06B831E057B5A8AF6DCCDF93 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
44+
20572430BAD38A4F958E5A1D /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
45+
2CFF6CDD19071C79FD304F76 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
4246
/* End PBXFileReference section */
4347

4448
/* Begin PBXFrameworksBuildPhase section */
4549
01E7EA911BFB6DC3001176A2 /* Frameworks */ = {
4650
isa = PBXFrameworksBuildPhase;
4751
buildActionMask = 2147483647;
4852
files = (
53+
3C6080D3EEF6F2601265CD0A /* libPods.a in Frameworks */,
4954
);
5055
runOnlyForDeploymentPostprocessing = 0;
5156
};
@@ -57,6 +62,8 @@
5762
children = (
5863
01E7EA961BFB6DC3001176A2 /* AXPopoverView */,
5964
01E7EA951BFB6DC3001176A2 /* Products */,
65+
AFA34F6318277CA83CF3449D /* Pods */,
66+
397631DF91C94CADB66B5F8B /* Frameworks */,
6067
);
6168
sourceTree = "<group>";
6269
};
@@ -108,16 +115,36 @@
108115
path = AXPopoverView;
109116
sourceTree = "<group>";
110117
};
118+
397631DF91C94CADB66B5F8B /* Frameworks */ = {
119+
isa = PBXGroup;
120+
children = (
121+
20572430BAD38A4F958E5A1D /* libPods.a */,
122+
);
123+
name = Frameworks;
124+
sourceTree = "<group>";
125+
};
126+
AFA34F6318277CA83CF3449D /* Pods */ = {
127+
isa = PBXGroup;
128+
children = (
129+
2CFF6CDD19071C79FD304F76 /* Pods.debug.xcconfig */,
130+
06B831E057B5A8AF6DCCDF93 /* Pods.release.xcconfig */,
131+
);
132+
name = Pods;
133+
sourceTree = "<group>";
134+
};
111135
/* End PBXGroup section */
112136

113137
/* Begin PBXNativeTarget section */
114138
01E7EA931BFB6DC3001176A2 /* AXPopoverView */ = {
115139
isa = PBXNativeTarget;
116140
buildConfigurationList = 01E7EAAB1BFB6DC3001176A2 /* Build configuration list for PBXNativeTarget "AXPopoverView" */;
117141
buildPhases = (
142+
D18EEF4514ABF2393D098885 /* Check Pods Manifest.lock */,
118143
01E7EA901BFB6DC3001176A2 /* Sources */,
119144
01E7EA911BFB6DC3001176A2 /* Frameworks */,
120145
01E7EA921BFB6DC3001176A2 /* Resources */,
146+
6CBDF593628F69BA05398295 /* Embed Pods Frameworks */,
147+
69883DDC05926706442F9383 /* Copy Pods Resources */,
121148
);
122149
buildRules = (
123150
);
@@ -176,6 +203,54 @@
176203
};
177204
/* End PBXResourcesBuildPhase section */
178205

206+
/* Begin PBXShellScriptBuildPhase section */
207+
69883DDC05926706442F9383 /* Copy Pods Resources */ = {
208+
isa = PBXShellScriptBuildPhase;
209+
buildActionMask = 2147483647;
210+
files = (
211+
);
212+
inputPaths = (
213+
);
214+
name = "Copy Pods Resources";
215+
outputPaths = (
216+
);
217+
runOnlyForDeploymentPostprocessing = 0;
218+
shellPath = /bin/sh;
219+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
220+
showEnvVarsInLog = 0;
221+
};
222+
6CBDF593628F69BA05398295 /* Embed Pods Frameworks */ = {
223+
isa = PBXShellScriptBuildPhase;
224+
buildActionMask = 2147483647;
225+
files = (
226+
);
227+
inputPaths = (
228+
);
229+
name = "Embed Pods Frameworks";
230+
outputPaths = (
231+
);
232+
runOnlyForDeploymentPostprocessing = 0;
233+
shellPath = /bin/sh;
234+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
235+
showEnvVarsInLog = 0;
236+
};
237+
D18EEF4514ABF2393D098885 /* Check Pods Manifest.lock */ = {
238+
isa = PBXShellScriptBuildPhase;
239+
buildActionMask = 2147483647;
240+
files = (
241+
);
242+
inputPaths = (
243+
);
244+
name = "Check Pods Manifest.lock";
245+
outputPaths = (
246+
);
247+
runOnlyForDeploymentPostprocessing = 0;
248+
shellPath = /bin/sh;
249+
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
250+
showEnvVarsInLog = 0;
251+
};
252+
/* End PBXShellScriptBuildPhase section */
253+
179254
/* Begin PBXSourcesBuildPhase section */
180255
01E7EA901BFB6DC3001176A2 /* Sources */ = {
181256
isa = PBXSourcesBuildPhase;
@@ -294,6 +369,7 @@
294369
};
295370
01E7EAAC1BFB6DC3001176A2 /* Debug */ = {
296371
isa = XCBuildConfiguration;
372+
baseConfigurationReference = 2CFF6CDD19071C79FD304F76 /* Pods.debug.xcconfig */;
297373
buildSettings = {
298374
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
299375
CODE_SIGN_IDENTITY = "iPhone Developer";
@@ -309,6 +385,7 @@
309385
};
310386
01E7EAAD1BFB6DC3001176A2 /* Release */ = {
311387
isa = XCBuildConfiguration;
388+
baseConfigurationReference = 06B831E057B5A8AF6DCCDF93 /* Pods.release.xcconfig */;
312389
buildSettings = {
313390
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
314391
CODE_SIGN_IDENTITY = "iPhone Developer";

AXPopoverView.xcworkspace/contents.xcworkspacedata

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AXPopoverView/AppDelegate.m

+36-5
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,43 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
2525
[[AXPopoverView appearance] setArrowConstant:6];
2626
[[AXPopoverView appearance] setTranslucentStyle:AXPopoverTranslucentDefault];
2727
[[AXPopoverView appearance] setItemTintColor:[[UIColor blackColor] colorWithAlphaComponent:0.8]];
28+
// [[AXPopoverView appearance] setAnimator:[AXPopoverViewAnimator animatorWithShowing:^(AXPopoverView *popoverView, BOOL animated, CGRect targetRect) {
29+
// if (animated) {
30+
// CGRect fromFrame = CGRectZero;
31+
// fromFrame.origin = popoverView.animatedFromPoint;
32+
// popoverView.transform = CGAffineTransformMakeScale(0, 0);
33+
// popoverView.layer.anchorPoint = popoverView.arrowPosition;
34+
// [UIView animateWithDuration:0.5 delay:0.0 usingSpringWithDamping:0.5 initialSpringVelocity:0.5 options:7 animations:^{
35+
// popoverView.transform = CGAffineTransformIdentity;
36+
// } completion:^(BOOL finish) {
37+
// // Call `viewDidShow:` when the animation finished.
38+
// if (finish) [popoverView viewDidShow:animated];
39+
// }];
40+
// }
41+
// } hiding:nil]];
2842
[[AXPopoverView appearance] setAnimator:[AXPopoverViewAnimator animatorWithShowing:^(AXPopoverView *popoverView, BOOL animated, CGRect targetRect) {
2943
if (animated) {
30-
CGRect fromFrame = CGRectZero;
31-
fromFrame.origin = popoverView.animatedFromPoint;
32-
popoverView.transform = CGAffineTransformMakeScale(0, 0);
33-
popoverView.layer.anchorPoint = popoverView.arrowPosition;
44+
CGPoint anchorPoint = popoverView.layer.anchorPoint;
45+
switch (popoverView.arrowDirection) {
46+
case AXPopoverArrowDirectionBottom:
47+
anchorPoint.y = 1;
48+
break;
49+
case AXPopoverArrowDirectionLeft:
50+
anchorPoint.x = 0;
51+
break;
52+
case AXPopoverArrowDirectionRight:
53+
anchorPoint.x = 1;
54+
break;
55+
case AXPopoverArrowDirectionTop:
56+
anchorPoint.y = 0;
57+
break;
58+
default:
59+
break;
60+
}
61+
CATransform3D transform = CATransform3DMakeRotation(-M_PI_4, 1, 0, 0);
3462
[UIView animateWithDuration:0.5 delay:0.0 usingSpringWithDamping:0.5 initialSpringVelocity:0.5 options:7 animations:^{
35-
popoverView.transform = CGAffineTransformIdentity;
63+
// popoverView.transform = CGAffineTransformIdentity;
64+
popoverView.layer.transform = transform;
3665
} completion:^(BOOL finish) {
3766
// Call `viewDidShow:` when the animation finished.
3867
if (finish) [popoverView viewDidShow:animated];
@@ -47,6 +76,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
4776
UIImageView *imageView = [[UIImageView alloc] initWithFrame:_window.bounds];
4877
imageView.contentMode = UIViewContentModeScaleAspectFill;
4978
imageView.image = [UIImage imageNamed:@"test.jpg"];
79+
CATransform3D transform = CATransform3DMakeRotation(-M_PI_4, 1, 0, 0);
80+
imageView.layer.transform = transform;
5081
[_window addSubview:imageView];
5182
[_window insertSubview:imageView atIndex:0];
5283
return YES;

Podfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
platform :ios, "7.0"
2+
3+
inhibit_all_warnings!
4+
5+
pod 'AGGeometryKit+POP'

Podfile.lock

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
PODS:
2+
- AGGeometryKit (1.2.2):
3+
- AGGeometryKit/CALayerProperties (= 1.2.2)
4+
- AGGeometryKit/UIViewProperties (= 1.2.2)
5+
- AGGeometryKit+POP (0.1):
6+
- AGGeometryKit+POP/Default (= 0.1)
7+
- AGGeometryKit+POP/Default (0.1):
8+
- AGGeometryKit (~> 1.0)
9+
- pop (~> 1.0.4)
10+
- AGGeometryKit/CALayerProperties (1.2.2)
11+
- AGGeometryKit/UIViewProperties (1.2.2)
12+
- pop (1.0.8)
13+
14+
DEPENDENCIES:
15+
- AGGeometryKit+POP
16+
17+
SPEC CHECKSUMS:
18+
AGGeometryKit: 46e712c5a3958e23b98fef15e57df1149670f231
19+
AGGeometryKit+POP: 7024e195ca657033dc61fbec2a38a1254c6d10a7
20+
pop: bb773ae2c791ca2629de13b347e7a8b450fa6a57
21+
22+
COCOAPODS: 0.39.0

Pods/AGGeometryKit+POP/LICENSE

+22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pods/AGGeometryKit+POP/README.md

+62
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pods/AGGeometryKit+POP/Source/POPAnimatableProperty+AGGeometryKit.h

+46
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)