瀏覽代碼

添加底部栏动效

zhengkun 3 年之前
父節點
當前提交
78e293a49e

+ 1 - 1
ios/JianYuIOS/JianYuIOS/AppDelegate.m

@@ -107,7 +107,7 @@
     [[UMSocialManager defaultManager] setUmSocialAppkey:@"5a685423f43e4833e500003e"];
     [[UMSocialManager defaultManager] setPlaform:UMSocialPlatformType_WechatSession appKey:@"wx0e6a5b18f4cfd10d" appSecret:@"bf12200554cb6edeb2be69d49dc11a3e" redirectURL:nil];
     [[UMSocialManager defaultManager] setPlaform:UMSocialPlatformType_QQ appKey:@"1106703118"appSecret:@"MYFVJZhtygWy5hzh" redirectURL:@"http://mobile.umeng.com/social"];
-    [WXApi registerApp:@"wx0e6a5b18f4cfd10d" universalLink:@"https:web-wky.jydev.jianyu360.com/"];
+    [WXApi registerApp:@"wx0e6a5b18f4cfd10d" universalLink:@"https:www.jianyu360.cn/"];
 }
 
 #pragma mark   ****处理接收通知情况****

+ 34 - 1
ios/JianYuIOS/JianYuIOS/JYTabBarController.m

@@ -68,8 +68,40 @@
     self.delegate = self;
     [self setUpAllChildVc];
     [self setSelectedIndex:0];
-    
+    [self addTabBarClick];
 //    [self switchRootViewController];
+    
+    
+}
+
+-(void)addTabBarClick {
+    for (UIControl *tabBarButton in self.tabBar.subviews){
+        if ([tabBarButton isKindOfClass:NSClassFromString(@"UITabBarButton")] ||
+            [tabBarButton isKindOfClass:NSClassFromString(@"UIButton")]) {
+            [tabBarButton addTarget:self action:@selector(tabBarButtonClick:) forControlEvents:UIControlEventTouchUpInside];
+        }
+    }
+}
+
+- (void)tabBarButtonClick:(UIControl *)tabBarButton {
+    for (UIView *imageView in tabBarButton.subviews) {
+        if ([imageView isKindOfClass:NSClassFromString(@"UITabBarSwappableImageView")] ||
+            [imageView isKindOfClass:NSClassFromString(@"UIImageView")]) {
+            CAKeyframeAnimation *continueAimation = [CAKeyframeAnimation animationWithKeyPath:@"transform"];
+            continueAimation.duration = 0.4f;
+            NSMutableArray *continueValues = [NSMutableArray array];
+            [continueValues addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 1.0, 1.0)]];
+            [continueValues addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.6, 0.6, 1.0)]];
+            [continueValues addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.2, 1.2, 1.0)]];
+            [continueValues addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 1.0, 1.0)]];
+            [continueValues addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.1, 1.1, 1.0)]];
+            [continueValues addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 1.0, 1.0)]];
+            continueAimation.values = continueValues;
+            continueAimation.removedOnCompletion = NO;
+            continueAimation.fillMode = kCAFillModeForwards;
+            [imageView.layer addAnimation:continueAimation forKey:nil];
+        }
+    }
 }
 
 //判断是否跳转
@@ -97,6 +129,7 @@
 
 - (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item{
 //    NSLog(@"点击了第几个item:%ld",item.tag);
+    
 }
 
 #pragma mark - -----------------------------------------

+ 1 - 1
ios/JianYuIOS/JianYuIOS/JianYuIOS.entitlements

@@ -6,7 +6,7 @@
 	<string>development</string>
 	<key>com.apple.developer.associated-domains</key>
 	<array>
-		<string>applinks:web-wky.jydev.jianyu360.com</string>
+		<string>applinks:www.jianyu360.cn</string>
 	</array>
 </dict>
 </plist>

+ 1 - 1
ios/JianYuIOS/JianYuIOS/剑鱼标讯Debug.entitlements

@@ -6,7 +6,7 @@
 	<string>development</string>
 	<key>com.apple.developer.associated-domains</key>
 	<array>
-		<string>applinks:web-wky.jydev.jianyu360.com</string>
+		<string>applinks:www.jianyu360.cn</string>
 	</array>
 </dict>
 </plist>