diff --git a/LIKE/LIKE/AppDelegate.m b/LIKE/LIKE/AppDelegate.m
index 42497a9..8f01755 100755
--- a/LIKE/LIKE/AppDelegate.m
+++ b/LIKE/LIKE/AppDelegate.m
@@ -78,12 +78,6 @@ -(void) load:(NSDictionary *)launchOptions
self.home = [LKHomeViewController viewController];
- self.tabBarController = [[LKTabBarController alloc] initWithViewControllers:@[LC_UINAVIGATION(self.home)]];
-
- self.window.rootViewController = self.tabBarController;
-
-
-
if (IOS8_OR_LATER) {
UIUserNotificationSettings * settings = [UIUserNotificationSettings settingsForTypes:(UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeAlert) categories:nil];
@@ -108,27 +102,39 @@ -(void) load:(NSDictionary *)launchOptions
}
+ self.tabBarController = [[LKTabBarController alloc] initWithViewControllers:@[LC_UINAVIGATION(self.home)]];
+
+ self.window.rootViewController = self.tabBarController;
+
+
if (!LKLocalUser.singleton.isLogin) {
- LCUIImageView * imageView = LCUIImageView.view;
- imageView.image = [LKWelcome image];
- imageView.viewFrameWidth = LC_DEVICE_WIDTH;
- imageView.viewFrameHeight = LC_DEVICE_HEIGHT + 20;
- imageView.contentMode = UIViewContentModeScaleAspectFit;
- [LC_KEYWINDOW addSubview:imageView];
-
- [LCUIApplication presentViewController:LKLoginViewController.viewController];
+
+ LCUIImageView * imageView = LCUIImageView.view;
+ imageView.image = [LKWelcome image];
+ imageView.viewFrameWidth = LC_DEVICE_WIDTH;
+ imageView.viewFrameHeight = LC_DEVICE_HEIGHT + 20;
+ imageView.contentMode = UIViewContentModeScaleAspectFit;
+ [LC_KEYWINDOW addSubview:imageView];
- [UIView animateWithDuration:1.5 delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
-
- imageView.transform = CGAffineTransformMakeScale(1.5, 1.5);
- imageView.alpha = 0;
-
- } completion:^(BOOL finished) {
-
- [imageView removeFromSuperview];
+ LKLoginViewController * login = LKLoginViewController.viewController;
+ [login view];
+
+ [self.tabBarController presentViewController:login animated:NO completion:^{
+ [UIView animateWithDuration:1.5 delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
+
+ imageView.transform = CGAffineTransformMakeScale(1.5, 1.5);
+ imageView.alpha = 0;
+
+ } completion:^(BOOL finished) {
+
+ [imageView removeFromSuperview];
+
+ }];
}];
+
+
}
// // welcom...
diff --git a/LIKE/LIKE/Info.plist b/LIKE/LIKE/Info.plist
index 60a294e..bdf4622 100755
--- a/LIKE/LIKE/Info.plist
+++ b/LIKE/LIKE/Info.plist
@@ -74,7 +74,7 @@
CFBundleVersion
- 1.1.0.4
+ 1.1.0.7
FacebookAppID
368579790017819
FacebookDisplayName
diff --git a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/da.lproj/Localizable.strings b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/da.lproj/Localizable.strings
index db45c93..0d40447 100755
--- a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/da.lproj/Localizable.strings
+++ b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/da.lproj/Localizable.strings
@@ -117,8 +117,8 @@
"添加标签(最多12个字)" = "New tag (12-character limit)";
// LKSearchPlaceHolderView
-"搜索" = "Related tags ";
-"相关内容" = " ";
+"搜索相关内容" = "Related tags \"%@\"";
+"搜索相关用户" = "Related users \"%@\"";
"最近搜索过的标签" = "Search history";
" 发现更多有趣内容" = " Search & Explore";
diff --git a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/de.lproj/Localizable.strings b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/de.lproj/Localizable.strings
index fd0c854..b5ba775 100755
Binary files a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/de.lproj/Localizable.strings and b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/de.lproj/Localizable.strings differ
diff --git a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/en.lproj/Localizable.strings b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/en.lproj/Localizable.strings
index fd0c854..b5ba775 100755
Binary files a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/en.lproj/Localizable.strings and b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/en.lproj/Localizable.strings differ
diff --git a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/es.lproj/Localizable.strings b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/es.lproj/Localizable.strings
index fd0c854..b5ba775 100755
Binary files a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/es.lproj/Localizable.strings and b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/es.lproj/Localizable.strings differ
diff --git a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/fr.lproj/Localizable.strings b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/fr.lproj/Localizable.strings
index fd0c854..b5ba775 100755
Binary files a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/fr.lproj/Localizable.strings and b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/fr.lproj/Localizable.strings differ
diff --git a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/it.lproj/Localizable.strings b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/it.lproj/Localizable.strings
index fd0c854..b5ba775 100755
Binary files a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/it.lproj/Localizable.strings and b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/it.lproj/Localizable.strings differ
diff --git a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/ja.lproj/Localizable.strings b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/ja.lproj/Localizable.strings
index fd0c854..b5ba775 100755
Binary files a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/ja.lproj/Localizable.strings and b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/ja.lproj/Localizable.strings differ
diff --git a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/pt-PT.lproj/Localizable.strings b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/pt-PT.lproj/Localizable.strings
index fd0c854..b5ba775 100755
Binary files a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/pt-PT.lproj/Localizable.strings and b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/pt-PT.lproj/Localizable.strings differ
diff --git a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/pt.lproj/Localizable.strings b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/pt.lproj/Localizable.strings
index fd0c854..b5ba775 100755
Binary files a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/pt.lproj/Localizable.strings and b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/pt.lproj/Localizable.strings differ
diff --git a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/ru.lproj/Localizable.strings b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/ru.lproj/Localizable.strings
index fd0c854..b5ba775 100755
Binary files a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/ru.lproj/Localizable.strings and b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/ru.lproj/Localizable.strings differ
diff --git a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/tr.lproj/Localizable.strings b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/tr.lproj/Localizable.strings
index fd0c854..b5ba775 100755
Binary files a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/tr.lproj/Localizable.strings and b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/tr.lproj/Localizable.strings differ
diff --git a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/zh-Hans.lproj/Localizable.strings b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/zh-Hans.lproj/Localizable.strings
index 96c0353..858e2e2 100755
Binary files a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/zh-Hans.lproj/Localizable.strings and b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/zh-Hans.lproj/Localizable.strings differ
diff --git a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/zh-Hant.lproj/Localizable.strings b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/zh-Hant.lproj/Localizable.strings
index 96c0353..858e2e2 100755
Binary files a/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/zh-Hant.lproj/Localizable.strings and b/LIKE/LIKE/LCFramework/Foundation/Resource/LCInternationalization.bundle/zh-Hant.lproj/Localizable.strings differ
diff --git a/LIKE/LIKE/LCFramework/UIKit/Extension/UIView+LCExtension.m b/LIKE/LIKE/LCFramework/UIKit/Extension/UIView+LCExtension.m
index e4dc4ff..976f927 100755
--- a/LIKE/LIKE/LCFramework/UIKit/Extension/UIView+LCExtension.m
+++ b/LIKE/LIKE/LCFramework/UIKit/Extension/UIView+LCExtension.m
@@ -87,6 +87,12 @@ -(void) setCornerRadius:(CGFloat)cornerRadius
self.layer.masksToBounds = YES;
}
+ else{
+
+ self.layer.shouldRasterize = YES;
+ self.layer.rasterizationScale = [UIScreen mainScreen].scale; // or [UIScreen mainScreen]
+ }
+
}
-(CGFloat) cornerRadius
diff --git a/LIKE/LIKE/LCFramework/UIKit/LCUIImageView.m b/LIKE/LIKE/LCFramework/UIKit/LCUIImageView.m
index 71e59fb..8af1652 100755
--- a/LIKE/LIKE/LCFramework/UIKit/LCUIImageView.m
+++ b/LIKE/LIKE/LCFramework/UIKit/LCUIImageView.m
@@ -285,7 +285,7 @@ - (M13ProgressViewRing *)indicator
self.ADD(_indicator);
}
- [_indicator setProgress:0 animated:YES];
+ [_indicator setProgress:0 animated:NO];
return _indicator;
}
@@ -318,7 +318,7 @@ -(void) handleNotification:(NSNotification *)notification
LC_FAST_ANIMATIONS(0.15, ^{
- self.indicator.alpha = 0;
+ _indicator.alpha = 0;
});
@@ -352,7 +352,7 @@ -(void) handleNotification:(NSNotification *)notification
LC_FAST_ANIMATIONS(0.15, ^{
- self.indicator.alpha = 0;
+ _indicator.alpha = 0;
});
}
@@ -369,7 +369,7 @@ -(void) handleNotification:(NSNotification *)notification
if (self.showIndicator) {
- [self.indicator setProgress:[object doubleValue] animated:YES];
+ [_indicator setProgress:[object doubleValue] animated:YES];
}
}
diff --git a/LIKE/LIKE/LKApplication/Application/Camera/LKCameraRollViewController.m b/LIKE/LIKE/LKApplication/Application/Camera/LKCameraRollViewController.m
index dd6a7ac..d31a2db 100644
--- a/LIKE/LIKE/LKApplication/Application/Camera/LKCameraRollViewController.m
+++ b/LIKE/LIKE/LKApplication/Application/Camera/LKCameraRollViewController.m
@@ -251,7 +251,7 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell
ALAsset * asset = self.datasource[indexPath.row - 1];
- cell.image = [UIImage imageWithCGImage:asset.thumbnail];
+ cell.image = [[UIImage imageWithCGImage:asset.thumbnail] autoOrientation];
return cell;
}
diff --git a/LIKE/LIKE/LKApplication/Application/Camera/LKNewPostViewController.m b/LIKE/LIKE/LKApplication/Application/Camera/LKNewPostViewController.m
index 92b2fa6..c6fd6a5 100644
--- a/LIKE/LIKE/LKApplication/Application/Camera/LKNewPostViewController.m
+++ b/LIKE/LIKE/LKApplication/Application/Camera/LKNewPostViewController.m
@@ -184,7 +184,7 @@ -(void) buildUI
@normally(self);
- if ([self checkOnSelectedTags:item.tagString]) {
+ if ([self checkOnSelectedTags:item.tagValue.tag]) {
[self showTopMessageErrorHud:LC_LO(@"该标签已经存在")];
}
diff --git a/LIKE/LIKE/LKApplication/Application/Home/LKHomeViewController.m b/LIKE/LIKE/LKApplication/Application/Home/LKHomeViewController.m
index 62cf956..78c33cb 100644
--- a/LIKE/LIKE/LKApplication/Application/Home/LKHomeViewController.m
+++ b/LIKE/LIKE/LKApplication/Application/Home/LKHomeViewController.m
@@ -194,6 +194,7 @@ -(void) viewDidLoad
}
[self.tableView insertRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:index.integerValue inSection:0]] withRowAnimation:UITableViewRowAnimationFade];
+
[self performSelector:@selector(scrollViewScrollToTop) withObject:nil afterDelay:0.5];
};
@@ -513,6 +514,7 @@ -(void) handleNavigationBarButton:(LCUINavigationBarButtonType)type
self.attentionViewController.tableView.scrollsToTop = NO;
self.tableView.scrollsToTop = YES;
self.tableView.hidden = NO;
+
[self.view bringSubviewToFront:self.tableView];
[self.view bringSubviewToFront:self.inputView];
@@ -637,7 +639,10 @@ -(void) handleNotification:(NSNotification *)notification
-(void) scrollViewScrollToTop
{
- [self.tableView setContentOffset:LC_POINT(0, 0) animated:YES];
+ LC_FAST_ANIMATIONS(0.25, ^{
+
+ [self.tableView setContentOffset:LC_POINT(0, 0) animated:NO];
+ });
}
-(void) reloadData
@@ -933,15 +938,22 @@ -(void) setFeedType:(LKHomepageFeedType)feedType
self.titleView = [LCUIImageView viewWithImage:[UIImage imageNamed:@"HomeLikeIcon.png" useCache:YES]];
self.titleView.alpha = 0;
- LC_FAST_ANIMATIONS(0.25, ^{
+ left.userInteractionEnabled = NO;
+ right.userInteractionEnabled = NO;
+
+ [UIView animateWithDuration:0.25 animations:^{
left.alpha = 1;
right.alpha = 1;
self.tableView.alpha = 1;
self.titleView.alpha = 1;
- });
-
+ } completion:^(BOOL finished) {
+
+ left.userInteractionEnabled = YES;
+ right.userInteractionEnabled = YES;
+
+ }];
});
}
else if (feedType == LKHomepageFeedTypeNotification){
@@ -980,12 +992,19 @@ -(void) setFeedType:(LKHomepageFeedType)feedType
self.titleView = header;
self.titleView.alpha = 0;
- LC_FAST_ANIMATIONS(0.25, ^{
+ left.userInteractionEnabled = NO;
+
+ [UIView animateWithDuration:0.25 animations:^{
left.alpha = 1;
notification.alpha = 1;
self.titleView.alpha = 1;
- });
+
+ } completion:^(BOOL finished) {
+
+ left.userInteractionEnabled = YES;
+
+ }];
}];
_feedType = feedType;
@@ -1026,7 +1045,9 @@ -(void) setFeedType:(LKHomepageFeedType)feedType
self.titleView = header;
self.titleView.alpha = 0;
-
+ left.userInteractionEnabled = NO;
+ right.userInteractionEnabled = NO;
+
[UIView animateWithDuration:0.25 animations:^{
left.alpha = 1;
@@ -1035,6 +1056,8 @@ -(void) setFeedType:(LKHomepageFeedType)feedType
} completion:^(BOOL finished) {
+ left.userInteractionEnabled = YES;
+ right.userInteractionEnabled = YES;
}];
[self scrollViewDidScroll:self.attentionViewController.tableView];
@@ -1154,6 +1177,7 @@ -(void) searchAction
}
});
+
LC_APPDELEGATE.tabBarController.assistiveTouchButton.hidden = YES;
LKSearchViewController * view = LKSearchViewController.view;
diff --git a/LIKE/LIKE/LKApplication/Application/Home/LKPostDetailViewController.m b/LIKE/LIKE/LKApplication/Application/Home/LKPostDetailViewController.m
index 6bfcfc6..9e2bf7b 100644
--- a/LIKE/LIKE/LKApplication/Application/Home/LKPostDetailViewController.m
+++ b/LIKE/LIKE/LKApplication/Application/Home/LKPostDetailViewController.m
@@ -55,6 +55,8 @@ @interface LKPostDetailViewController () maxWidth ? maxWidth : self.userName.viewFrameWidth;
self.userLikes.viewFrameX = self.userName.viewRightX + 5;
- self.likesTip.viewFrameX = self.userLikes. viewRightX + 5;
+
+ CGFloat width = [self.post.user.likes.description sizeWithFont:self.userLikes.font byWidth:1000].width;
+
+ self.likesTip.viewFrameX = self.userLikes.viewFrameX + width + 5;
self.postTime.text = [NSString stringWithFormat:@"%@ %@ %@", [LKTime dateNearByTimestamp:self.post.timestamp], self.post.place.length ? LC_LO(@"来自") : @"", self.post.place.length ? self.post.place : @""];
@@ -903,6 +902,15 @@ - (UITableViewCell *)tableView:(LCUITableView *)tableView cellForRowAtIndexPath:
}
self.userLikes.text = self.post.user.likes.description;
+
+ [UIView animateWithDuration:0.25 animations:^{
+
+ CGFloat width = [self.post.user.likes.description sizeWithFont:self.userLikes.font byWidth:1000].width;
+
+ self.likesTip.viewFrameX = self.userLikes.viewFrameX + width + 5;
+ }];
+
+ [self.shareTools hideTools];
};
cell.willRequest = ^(LKTagItem * item){
@@ -960,6 +968,7 @@ - (UITableViewCell *)tableView:(LCUITableView *)tableView cellForRowAtIndexPath:
};
+ [self.shareTools hideTools];
};
@@ -968,6 +977,8 @@ - (UITableViewCell *)tableView:(LCUITableView *)tableView cellForRowAtIndexPath:
@normally(self);
+ [self.shareTools hideTools];
+
[self _beginComment:tag];
};
@@ -977,6 +988,8 @@ - (UITableViewCell *)tableView:(LCUITableView *)tableView cellForRowAtIndexPath:
@normally(self);
+ [self.shareTools hideTools];
+
if(![LKLoginViewController needLoginOnViewController:self]){
[self.inputView resignFirstResponder];
@@ -1006,6 +1019,8 @@ - (UITableViewCell *)tableView:(LCUITableView *)tableView cellForRowAtIndexPath:
@normally(self);
+ [self.shareTools hideTools];
+
if(![LKLoginViewController needLoginOnViewController:self]){
[self.inputView resignFirstResponder];
@@ -1233,6 +1248,8 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
+ [self.shareTools hideTools];
+
if (indexPath.section == 0) {
[LKUserCenterViewController pushUserCenterWithUser:self.post.user navigationController:self.navigationController];
diff --git a/LIKE/LIKE/LKApplication/Application/Home/LKTagCommentsViewController.m b/LIKE/LIKE/LKApplication/Application/Home/LKTagCommentsViewController.m
index fda723d..88fc9fd 100644
--- a/LIKE/LIKE/LKApplication/Application/Home/LKTagCommentsViewController.m
+++ b/LIKE/LIKE/LKApplication/Application/Home/LKTagCommentsViewController.m
@@ -12,6 +12,7 @@
#import "LKTime.h"
#import "LKInputView.h"
#import "LKLocationManager.h"
+#import "LCUIKeyBoard.h"
@interface LKTagCommentsViewController ()
@@ -29,6 +30,8 @@ @interface LKTagCommentsViewController ()
-LC_PROPERTY(strong) LCUIBlurView * blur;
+LC_PROPERTY(strong) UIView * blur;
LC_PROPERTY(assign) UIViewController * inViewController;
LC_PROPERTY(strong) LKSearchBar * searchBar;
LC_PROPERTY(strong) UIScrollView * scrollView;
@@ -99,34 +99,11 @@ -(void) buildUI
// self.ADD(self.searchBar);
- self.placeholderView = LKSearchPlaceholderView.view;
- self.placeholderView.viewFrameWidth = self.viewFrameWidth;
- self.placeholderView.viewFrameHeight = self.viewFrameHeight;
- self.placeholderView.viewFrameY = 0;
- self.placeholderView.alpha = 0;
- self.ADD(self.placeholderView);
-
- @weakly(self);
-
- self.placeholderView.didTap = ^(){
-
- @normally(self);
-
- [self.searchBar.searchField resignFirstResponder];
- };
-
- self.placeholderView.didSelectRow = ^(NSString * tagString){
-
- LKSearchResultsViewController * search = [[LKSearchResultsViewController alloc] initWithSearchString:tagString];
-
- [LC_APPDELEGATE.home.navigationController pushViewController:search animated:YES];
- };
-
-
self.hotTags = LKHotTagsSegmentView.view;
self.ADD(self.hotTags);
-
+ @weakly(self);
+
self.hotTags.itemDidLoad = ^(NSArray * value){
@normally(self);
@@ -150,6 +127,28 @@ -(void) buildUI
[self.hotTags performSelector:@selector(loadHotTags) withObject:nil afterDelay:0];
+
+
+ self.placeholderView = LKSearchPlaceholderView.view;
+ self.placeholderView.viewFrameWidth = self.viewFrameWidth;
+ self.placeholderView.viewFrameHeight = self.viewFrameHeight;
+ self.placeholderView.viewFrameY = 0;
+ self.placeholderView.alpha = 0;
+ self.ADD(self.placeholderView);
+
+ self.placeholderView.didTap = ^(){
+
+ @normally(self);
+
+ [self.searchBar.searchField resignFirstResponder];
+ };
+
+ self.placeholderView.didSelectRow = ^(NSString * tagString){
+
+ LKSearchResultsViewController * search = [[LKSearchResultsViewController alloc] initWithSearchString:tagString];
+
+ [LC_APPDELEGATE.home.navigationController pushViewController:search animated:YES];
+ };
}
#pragma mark -
@@ -315,7 +314,7 @@ -(void) searchPlaceHolderTags:(NSString *)searchString
}
- LKHttpRequestInterface * interface = [LKHttpRequestInterface interfaceType:[NSString stringWithFormat:@"tag/guess/%@" ,searchString.URLCODE()]].AUTO_SESSION();
+ LKHttpRequestInterface * interface = [LKHttpRequestInterface interfaceType:[NSString stringWithFormat:@"search/topsearch/%@" ,searchString.URLCODE()]].AUTO_SESSION();
@weakly(self);
@@ -325,7 +324,18 @@ -(void) searchPlaceHolderTags:(NSString *)searchString
if (result.state == LKHttpRequestStateFinished) {
- NSArray * array = result.json[@"data"];
+ NSArray * array0 = result.json[@"data"][@"users"];
+
+ NSMutableArray * users = [NSMutableArray array];
+
+ for (NSDictionary * dic in array0) {
+
+ [users addObject:[LKUser objectFromDictionary:dic]];
+ }
+
+ self.placeholderView.users = users;
+
+ NSArray * array = result.json[@"data"][@"tags"];
NSMutableArray * tags = [NSMutableArray array];
diff --git a/LIKE/LIKE/LKApplication/Application/Search/Views/LKHotTagsSegmentView.m b/LIKE/LIKE/LKApplication/Application/Search/Views/LKHotTagsSegmentView.m
index 5bc95a1..ec5e91b 100644
--- a/LIKE/LIKE/LKApplication/Application/Search/Views/LKHotTagsSegmentView.m
+++ b/LIKE/LIKE/LKApplication/Application/Search/Views/LKHotTagsSegmentView.m
@@ -25,7 +25,7 @@ -(instancetype) init
self.itemArray = [NSMutableArray array];
- self.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.8];
+ self.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:1];
self.alpha = 0;
}
@@ -76,6 +76,7 @@ -(void) setHotTags:(NSArray *)tags
{
self.scrollView = UIScrollView.view;
self.scrollView.frame = self.bounds;
+ self.scrollView.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:1];
self.scrollView.showsHorizontalScrollIndicator = NO;
self.ADD(self.scrollView);
diff --git a/LIKE/LIKE/LKApplication/Application/Search/Views/LKHotUserView.m b/LIKE/LIKE/LKApplication/Application/Search/Views/LKHotUserView.m
index 1d3ef55..c27400c 100644
--- a/LIKE/LIKE/LKApplication/Application/Search/Views/LKHotUserView.m
+++ b/LIKE/LIKE/LKApplication/Application/Search/Views/LKHotUserView.m
@@ -32,6 +32,7 @@ -(instancetype) initWithFrame:(CGRect)frame
self.scrollView.backgroundColor = [UIColor whiteColor];
self.scrollView.cornerRadius = 2;
self.ADD(self.scrollView);
+
}
return self;
diff --git a/LIKE/LIKE/LKApplication/Application/Search/Views/LKSearchPlaceholderView.h b/LIKE/LIKE/LKApplication/Application/Search/Views/LKSearchPlaceholderView.h
index 384f06f..96fc9d3 100644
--- a/LIKE/LIKE/LKApplication/Application/Search/Views/LKSearchPlaceholderView.h
+++ b/LIKE/LIKE/LKApplication/Application/Search/Views/LKSearchPlaceholderView.h
@@ -8,6 +8,7 @@
#import
+LC_BLOCK(void, LKSearchPlaceholderViewDidSelectRow, (NSString * tagString));
LC_BLOCK(void, LKSearchPlaceholderViewDidSelectRow, (NSString * tagString));
@interface LKSearchPlaceholderView : LCUITableView
@@ -16,4 +17,6 @@ LC_PROPERTY(strong) NSArray * tags;
LC_PROPERTY(copy) NSString * searchString;
LC_PROPERTY(copy) LKSearchPlaceholderViewDidSelectRow didSelectRow;
+LC_PROPERTY(strong) NSArray * users;
+
@end
diff --git a/LIKE/LIKE/LKApplication/Application/Search/Views/LKSearchPlaceholderView.m b/LIKE/LIKE/LKApplication/Application/Search/Views/LKSearchPlaceholderView.m
index 837be0a..69f8e4e 100644
--- a/LIKE/LIKE/LKApplication/Application/Search/Views/LKSearchPlaceholderView.m
+++ b/LIKE/LIKE/LKApplication/Application/Search/Views/LKSearchPlaceholderView.m
@@ -54,6 +54,8 @@ -(void) setTags:(NSArray *)tags
if (tags == nil) {
+ self.users = nil;
+
NSArray * history = [LKSearchHistory history];
NSMutableArray * result = [NSMutableArray array];
@@ -82,6 +84,10 @@ -(void) setSearchString:(NSString *)searchString tags:(NSArray *)tags
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView;
{
+ if (self.users.count) {
+ return 4;
+ }
+
return 2;
}
@@ -92,20 +98,100 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
return 1;
}
- if (!self.tags) {
+ if (section == 1) {
+
+ if (!self.tags) {
+
+ return self.history.count;
+ }
+
+ return self.tags.count;
+ }
+
+ if (section == 2) {
+ return 1;
+ }
+
+ if (section == 3) {
- return self.history.count;
+ return self.users.count;
}
- return self.tags.count;
+ return 0;
}
- (UITableViewCell *)tableView:(LCUITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
- LCUITableViewCell * cell = [tableView autoCreateDequeueReusableCellWithIdentifier:@"Content" andClass:[LCUITableViewCell class] configurationCell:^(LCUITableViewCell * configurationCell) {
+
+ if (indexPath.section == 0 || indexPath.section == 1) {
+
+ LCUITableViewCell * cell = [tableView autoCreateDequeueReusableCellWithIdentifier:@"Content" andClass:[LCUITableViewCell class] configurationCell:^(LCUITableViewCell * configurationCell) {
+
+ LCUILabel * label = LCUILabel.view;
+ label.viewFrameX = 20;
+ label.viewFrameWidth = self.viewFrameWidth;
+ label.viewFrameHeight = 117. / 3.;
+ label.font = LK_FONT(13);
+ label.textColor = LC_RGB(79, 62, 56);
+ label.tag = 1000;
+ configurationCell.ADD(label);
+
+
+ UIView * line = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"TalkLine.png" useCache:YES]];
+ line.viewFrameWidth = LC_DEVICE_WIDTH;
+ line.viewFrameY = 117. / 3. - line.viewFrameHeight - 0.5;
+ configurationCell.ADD(line);
+
+ }];
+
+ LCUILabel * label = cell.FIND(1000);
+
+ if (indexPath.section == 0) {
+
+ if (self.tags == nil) {
+
+ label.text = LC_LO(@"最近搜索过的标签");
+ }
+ else{
+
+ label.text = [NSString stringWithFormat:LC_LO(@"搜索相关内容"), self.searchString];
+ }
+ }
+ else{
+
+ LKTag * tag = nil ;
+
+ if (self.tags == nil) {
+
+ tag = self.history[indexPath.row];
+ }
+ else{
+
+ tag = self.tags[indexPath.row];
+ }
+
+ label.text = tag.tag;
+ }
+
+ return cell;
+
+ }
+
+ LCUITableViewCell * cell = [tableView autoCreateDequeueReusableCellWithIdentifier:@"User" andClass:[LCUITableViewCell class] configurationCell:^(LCUITableViewCell * configurationCell) {
+
+
+ LCUIImageView * head = LCUIImageView.view;
+ head.viewFrameWidth = 25;
+ head.viewFrameHeight = 25;
+ head.cornerRadius = 25 / 2;
+ head.viewFrameX = 20;
+ head.viewFrameY = 117 / 3 / 2 - 25 / 2;
+ head.tag = 1001;
+ configurationCell.ADD(head);
+
LCUILabel * label = LCUILabel.view;
- label.viewFrameX = 20;
+ label.viewFrameX = head.viewRightX + 10;
label.viewFrameWidth = self.viewFrameWidth;
label.viewFrameHeight = 117. / 3.;
label.font = LK_FONT(13);
@@ -116,38 +202,30 @@ - (UITableViewCell *)tableView:(LCUITableView *)tableView cellForRowAtIndexPath:
UIView * line = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"TalkLine.png" useCache:YES]];
line.viewFrameWidth = LC_DEVICE_WIDTH;
- line.viewFrameY = 117. / 3. - line.viewFrameHeight;
+ line.viewFrameY = 117. / 3. - line.viewFrameHeight - 0.5;
configurationCell.ADD(line);
}];
+ LCUIImageView * head = cell.FIND(1001);
LCUILabel * label = cell.FIND(1000);
-
- if (indexPath.section == 0) {
+
+ if (indexPath.section == 2) {
- if (self.tags == nil) {
-
- label.text = LC_LO(@"最近搜索过的标签");
- }
- else{
+ head.alpha = 0;
+ label.viewFrameX = 20;
- label.text = [NSString stringWithFormat:@"%@\"%@\"%@", LC_LO(@"搜索"), self.searchString, LC_LO(@"相关内容")];
- }
+ label.text = [NSString stringWithFormat:LC_LO(@"搜索相关用户"), self.searchString];
}
else{
-
- LKTag * tag = nil ;
+
+ LKUser * user = self.users[indexPath.row];
- if (self.tags == nil) {
-
- tag = self.history[indexPath.row];
- }
- else{
-
- tag = self.tags[indexPath.row];
- }
+ head.url = user.avatar;
+ label.text = user.name;
- label.text = tag.tag;
+ head.alpha = 1;
+ label.viewFrameX = head.viewRightX + 10;
}
return cell;
@@ -179,6 +257,12 @@ -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
self.didSelectRow(tag.tag);
}
}
+ else if (indexPath.section == 3){
+
+ LKUser * user = self.users[indexPath.row];
+
+ self.SEND(@"PushUserCenter").object = user;
+ }
}
diff --git a/LIKE/LIKE/LKApplication/Application/Search/Views/LKSearchResultCollectionViewCell.m b/LIKE/LIKE/LKApplication/Application/Search/Views/LKSearchResultCollectionViewCell.m
index 97b9655..87d43d8 100644
--- a/LIKE/LIKE/LKApplication/Application/Search/Views/LKSearchResultCollectionViewCell.m
+++ b/LIKE/LIKE/LKApplication/Application/Search/Views/LKSearchResultCollectionViewCell.m
@@ -84,6 +84,7 @@ -(instancetype) initWithFrame:(CGRect)frame
self.backgroundColor = [UIColor whiteColor];
self.cornerRadius = 2;
+ self.layer.masksToBounds = YES;
}
return self;
@@ -138,7 +139,7 @@ -(void) setPost:(LKPost *)post
self.contentImage.url = post.content;
- [LKSearchResultCollectionViewCell roundCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight forView:self.contentImage];
+ //[LKSearchResultCollectionViewCell roundCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight forView:self.contentImage];
}
-(void) handleHeadTap:(UITapGestureRecognizer *)tap
diff --git a/LIKE/LIKE/LKApplication/Application/UserCenter/LKUserCenterViewController.m b/LIKE/LIKE/LKApplication/Application/UserCenter/LKUserCenterViewController.m
index 3c6db4d..40757d3 100644
--- a/LIKE/LIKE/LKApplication/Application/UserCenter/LKUserCenterViewController.m
+++ b/LIKE/LIKE/LKApplication/Application/UserCenter/LKUserCenterViewController.m
@@ -482,6 +482,8 @@ -(void) setCurrentType:(LKUserCenterModelType)currentType
{
_currentType = currentType;
+ self.pullLoader.canLoadMore = [self.userCenterModel canLoadMoreWithType:currentType];
+
[self loadData:currentType diretion:LCUIPullLoaderDiretionTop];
}
@@ -504,6 +506,8 @@ -(void) loadData:(LKUserCenterModelType)type diretion:(LCUIPullLoaderDiretion)di
[self showTopMessageErrorHud:error];;
}
+
+ self.pullLoader.canLoadMore = [self.userCenterModel canLoadMoreWithType:type];
};
}
@@ -521,7 +525,6 @@ -(void) loadData:(LKUserCenterModelType)type diretion:(LCUIPullLoaderDiretion)di
[postDetail setPresendModelAnimationOpen];
[self.navigationController presentViewController:nav animated:YES completion:nil];
-
}
#pragma mark -
diff --git a/LIKE/LIKE/LKApplication/Model/HTTPModel/LKUserCenterModel.h b/LIKE/LIKE/LKApplication/Model/HTTPModel/LKUserCenterModel.h
index 1f5fb75..7596874 100644
--- a/LIKE/LIKE/LKApplication/Model/HTTPModel/LKUserCenterModel.h
+++ b/LIKE/LIKE/LKApplication/Model/HTTPModel/LKUserCenterModel.h
@@ -29,5 +29,6 @@ LC_PROPERTY(copy) LKUserCenterModelRequestFinished requestFinished;
-(NSMutableArray *) dataWithType:(LKUserCenterModelType)type;
+-(BOOL) canLoadMoreWithType:(LKUserCenterModelType)type;
@end
diff --git a/LIKE/LIKE/LKApplication/Model/HTTPModel/LKUserCenterModel.m b/LIKE/LIKE/LKApplication/Model/HTTPModel/LKUserCenterModel.m
index a0adf3e..69c3a62 100644
--- a/LIKE/LIKE/LKApplication/Model/HTTPModel/LKUserCenterModel.m
+++ b/LIKE/LIKE/LKApplication/Model/HTTPModel/LKUserCenterModel.m
@@ -15,6 +15,10 @@ @interface LKUserCenterModel ()
LC_PROPERTY(assign) NSInteger focusPage;
LC_PROPERTY(assign) NSInteger fansPage;
+LC_PROPERTY(assign) BOOL photoCanLoadMore;
+LC_PROPERTY(assign) BOOL focusCanLoadMore;
+LC_PROPERTY(assign) BOOL fansCanLoadMore;
+
@end
@implementation LKUserCenterModel
@@ -24,6 +28,19 @@ -(void) dealloc
[self cancelAllRequests];
}
+-(instancetype) init
+{
+ if (self = [super init]) {
+
+ self.photoCanLoadMore = YES;
+ self.focusCanLoadMore = YES;
+ self.fansCanLoadMore = YES;
+ }
+
+ return self;
+}
+
+
-(void) getDataAtFirstPage:(BOOL)isFirstPage type:(LKUserCenterModelType)type uid:(NSNumber *)uid
{
NSInteger page = 0;
@@ -58,7 +75,7 @@ -(void) getDataAtFirstPage:(BOOL)isFirstPage type:(LKUserCenterModelType)type ui
if (result.state == LKHttpRequestStateFinished) {
[self handleResultWithType:type isFirstPage:isFirstPage result:result];
-
+
[self setPageWithType:type page:page];
if (self.requestFinished) {
@@ -75,6 +92,32 @@ -(void) getDataAtFirstPage:(BOOL)isFirstPage type:(LKUserCenterModelType)type ui
}
+-(BOOL) canLoadMoreWithType:(LKUserCenterModelType)type
+{
+ switch (type) {
+ case LKUserCenterModelTypePhotos:
+
+ return self.photoCanLoadMore;
+
+ break;
+ case LKUserCenterModelTypeFocus:
+
+ return self.focusCanLoadMore;
+
+ break;
+ case LKUserCenterModelTypeFans:
+
+ return self.fansCanLoadMore;
+
+ break;
+ default:
+
+ return YES;
+
+ break;
+ }
+}
+
-(void) handleResultWithType:(LKUserCenterModelType)type isFirstPage:(BOOL)isFirstPage result:(LKHttpRequestResult *)result
{
switch (type) {
@@ -98,6 +141,12 @@ -(void) handleResultWithType:(LKUserCenterModelType)type isFirstPage:(BOOL)isFir
[self.photoArray addObjectsFromArray:resultData];
}
+
+ if (datasource.count < 21) {
+
+ self.photoCanLoadMore = NO;
+ }
+
}
break;
case LKUserCenterModelTypeFocus:
@@ -119,6 +168,11 @@ -(void) handleResultWithType:(LKUserCenterModelType)type isFirstPage:(BOOL)isFir
[self.focusArray addObjectsFromArray:resultData];
}
+
+ if (datasource.count < 20) {
+
+ self.focusCanLoadMore = NO;
+ }
}
break;
case LKUserCenterModelTypeFans:
@@ -140,6 +194,11 @@ -(void) handleResultWithType:(LKUserCenterModelType)type isFirstPage:(BOOL)isFir
[self.fansArray addObjectsFromArray:resultData];
}
+
+ if (datasource.count < 20) {
+
+ self.fansCanLoadMore = NO;
+ }
}
break;
default:
diff --git a/LIKE/LIKE/LKExternal/INSSearchBar/INSSearchBar.m b/LIKE/LIKE/LKExternal/INSSearchBar/INSSearchBar.m
index bdad63c..b5c4b98 100755
--- a/LIKE/LIKE/LKExternal/INSSearchBar/INSSearchBar.m
+++ b/LIKE/LIKE/LKExternal/INSSearchBar/INSSearchBar.m
@@ -86,10 +86,7 @@ - (id)initWithFrame:(CGRect)frame
self.searchFrame.backgroundColor = [UIColor clearColor];
self.searchFrame.opaque = NO;
self.searchFrame.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
- self.searchFrame.layer.masksToBounds = YES;
- self.searchFrame.layer.cornerRadius = CGRectGetHeight(self.bounds) / 2;
- self.searchFrame.layer.borderWidth = 0.5;
- self.searchFrame.layer.borderColor = [UIColor clearColor].CGColor;
+ self.searchFrame.cornerRadius = CGRectGetHeight(self.bounds) / 2;
self.searchFrame.contentMode = UIViewContentModeRedraw;
[self addSubview:self.searchFrame];
diff --git a/LIKE/LIKE/LKExternal/RDVTabBarController/RDVTabBarController.m b/LIKE/LIKE/LKExternal/RDVTabBarController/RDVTabBarController.m
index 7eee511..6b8c871 100755
--- a/LIKE/LIKE/LKExternal/RDVTabBarController/RDVTabBarController.m
+++ b/LIKE/LIKE/LKExternal/RDVTabBarController/RDVTabBarController.m
@@ -44,6 +44,7 @@ @implementation RDVTabBarController
#pragma mark - View lifecycle
- (void)viewDidLoad {
+
[super viewDidLoad];
[self.view addSubview:[self contentView]];
@@ -51,6 +52,7 @@ - (void)viewDidLoad {
}
- (void)viewWillAppear:(BOOL)animated {
+
[super viewWillAppear:animated];
[self setSelectedIndex:[self selectedIndex]];
@@ -58,6 +60,11 @@ - (void)viewWillAppear:(BOOL)animated {
[self setTabBarHidden:self.isTabBarHidden animated:NO];
}
+-(void) viewDidAppear:(BOOL)animated
+{
+ [super viewDidAppear:animated];
+}
+
- (UIStatusBarStyle)preferredStatusBarStyle {
return self.selectedViewController.preferredStatusBarStyle;
}
diff --git a/LIKE/LIKE/LKTabBarController.mm b/LIKE/LIKE/LKTabBarController.mm
index c8aee65..0166451 100755
--- a/LIKE/LIKE/LKTabBarController.mm
+++ b/LIKE/LIKE/LKTabBarController.mm
@@ -47,6 +47,7 @@ -(void) viewWillAppear:(BOOL)animated
tip.tag = 100;
tip.translatesAutoresizingMaskIntoConstraints = NO;
tip.alpha = 0;
+ tip.userInteractionEnabled = NO;
[tip startAnimating];
self.assistiveTouchButton.ADD(tip);
diff --git a/LIKE/LIKE/LKUIKit/LKInputView.h b/LIKE/LIKE/LKUIKit/LKInputView.h
index 6bfe8a0..3f87aeb 100755
--- a/LIKE/LIKE/LKUIKit/LKInputView.h
+++ b/LIKE/LIKE/LKUIKit/LKInputView.h
@@ -13,7 +13,7 @@ LC_BLOCK(void, LKInputViewWillDismiss, (NSString * text));
LC_BLOCK(void, LKInputViewDidShow, ());
-@interface LKInputView : LCUIBlurView
+@interface LKInputView : UIView
LC_PROPERTY(copy) LKInputViewWillDismiss willDismiss;
LC_PROPERTY(copy) LKInputViewSend sendAction;
diff --git a/LIKE/LIKE/LKUIKit/LKInputView.m b/LIKE/LIKE/LKUIKit/LKInputView.m
index 4ff97c6..7154c60 100755
--- a/LIKE/LIKE/LKUIKit/LKInputView.m
+++ b/LIKE/LIKE/LKUIKit/LKInputView.m
@@ -23,7 +23,7 @@ -(instancetype) init
// self.ADD(view);
- self.tintColor = [UIColor whiteColor];
+ self.backgroundColor = [UIColor whiteColor];
self.viewFrameWidth = LC_DEVICE_WIDTH;
self.viewFrameHeight = 44;