From 88eac7739430cfcbed68a1338e56e301c55fc3e8 Mon Sep 17 00:00:00 2001 From: Zhiping Yang Date: Mon, 19 Jan 2015 14:12:40 +0800 Subject: [PATCH] fix some bugs Signed-off-by: Zhiping Yang --- UUChat/UUImageAvatarBrowser.m | 5 ++--- UUChat/UUInputFunctionView.m | 2 +- UUChat/UUProgressHUD.m | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/UUChat/UUImageAvatarBrowser.m b/UUChat/UUImageAvatarBrowser.m index 594033d..0d74b3c 100644 --- a/UUChat/UUImageAvatarBrowser.m +++ b/UUChat/UUImageAvatarBrowser.m @@ -9,7 +9,6 @@ #import "UUImageAvatarBrowser.h" static UIImageView *orginImageView; -static CGRect oldframe; @implementation UUImageAvatarBrowser +(void)showImage:(UIImageView *)avatarImageView{ @@ -18,7 +17,7 @@ +(void)showImage:(UIImageView *)avatarImageView{ orginImageView.alpha = 0; UIWindow *window=[UIApplication sharedApplication].keyWindow; UIView *backgroundView=[[UIView alloc]initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)]; - oldframe=[avatarImageView convertRect:avatarImageView.bounds toView:window]; + CGRect oldframe=[avatarImageView convertRect:avatarImageView.bounds toView:window]; backgroundView.backgroundColor=[[UIColor blackColor] colorWithAlphaComponent:0.7]; backgroundView.alpha=1; UIImageView *imageView=[[UIImageView alloc]initWithFrame:oldframe]; @@ -42,7 +41,7 @@ +(void)hideImage:(UITapGestureRecognizer*)tap{ UIView *backgroundView=tap.view; UIImageView *imageView=(UIImageView*)[tap.view viewWithTag:1]; [UIView animateWithDuration:0.3 animations:^{ - imageView.frame=oldframe; + imageView.frame=[orginImageView convertRect:orginImageView.bounds toView:[UIApplication sharedApplication].keyWindow]; } completion:^(BOOL finished) { [backgroundView removeFromSuperview]; orginImageView.alpha = 1; diff --git a/UUChat/UUInputFunctionView.m b/UUChat/UUInputFunctionView.m index 1b7f107..7c8b9e6 100644 --- a/UUChat/UUInputFunctionView.m +++ b/UUChat/UUInputFunctionView.m @@ -80,7 +80,7 @@ - (id)initWithSuperVC:(UIViewController *)superVC //输入框的提示语 placeHold = [[UILabel alloc]initWithFrame:CGRectMake(20, 0, 200, 30)]; - placeHold.text = @"Please input the content"; + placeHold.text = @"Input the contents here"; placeHold.textColor = [[UIColor lightGrayColor] colorWithAlphaComponent:0.8]; [self.TextViewInput addSubview:placeHold]; diff --git a/UUChat/UUProgressHUD.m b/UUChat/UUProgressHUD.m index ab27020..abd9342 100644 --- a/UUChat/UUProgressHUD.m +++ b/UUChat/UUProgressHUD.m @@ -76,7 +76,7 @@ - (void)show { centerLabel.text = @"60"; centerLabel.textAlignment = NSTextAlignmentCenter; centerLabel.font = [UIFont systemFontOfSize:30]; - centerLabel.textColor = [UIColor whiteColor]; + centerLabel.textColor = [UIColor yellowColor]; edgeImageView.frame = CGRectMake(0, 0, 154, 154); @@ -117,7 +117,7 @@ -(void) startAnimation if (second <= 10.0f) { centerLabel.textColor = [UIColor redColor]; }else{ - centerLabel.textColor = [UIColor whiteColor]; + centerLabel.textColor = [UIColor yellowColor]; } centerLabel.text = [NSString stringWithFormat:@"%.1f",second-0.1]; [UIView commitAnimations];