diff --git a/LIKE/LIKE.xcodeproj/project.pbxproj b/LIKE/LIKE.xcodeproj/project.pbxproj index 4f6f5e8..c433a72 100755 --- a/LIKE/LIKE.xcodeproj/project.pbxproj +++ b/LIKE/LIKE.xcodeproj/project.pbxproj @@ -326,6 +326,7 @@ 139B06A51ADBF50F006A260F /* SquareCashStyleBehaviorDefiner.m in Sources */ = {isa = PBXBuildFile; fileRef = 139B069D1ADBF50F006A260F /* SquareCashStyleBehaviorDefiner.m */; }; 139B06A61ADBF50F006A260F /* UIView+BLKFlexibleHeightBarSubview.m in Sources */ = {isa = PBXBuildFile; fileRef = 139B069F1ADBF50F006A260F /* UIView+BLKFlexibleHeightBarSubview.m */; }; 139B06A91ADBF577006A260F /* LKHomepageHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 139B06A81ADBF577006A260F /* LKHomepageHeader.m */; }; + 139C712A1B54CAE60051B2C3 /* NSNull+LCExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 139C71291B54CAE60051B2C3 /* NSNull+LCExtension.m */; }; 13A951A01B4CE528002B73ED /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 13A9518E1B4CE528002B73ED /* AFHTTPRequestOperation.m */; }; 13A951A11B4CE528002B73ED /* AFHTTPRequestOperationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 13A951901B4CE528002B73ED /* AFHTTPRequestOperationManager.m */; }; 13A951A21B4CE528002B73ED /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 13A951921B4CE528002B73ED /* AFHTTPSessionManager.m */; }; @@ -1307,6 +1308,8 @@ 139B069F1ADBF50F006A260F /* UIView+BLKFlexibleHeightBarSubview.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+BLKFlexibleHeightBarSubview.m"; sourceTree = ""; }; 139B06A71ADBF577006A260F /* LKHomepageHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LKHomepageHeader.h; sourceTree = ""; }; 139B06A81ADBF577006A260F /* LKHomepageHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LKHomepageHeader.m; sourceTree = ""; }; + 139C71281B54CAE60051B2C3 /* NSNull+LCExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNull+LCExtension.h"; sourceTree = ""; }; + 139C71291B54CAE60051B2C3 /* NSNull+LCExtension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNull+LCExtension.m"; sourceTree = ""; }; 13A9518D1B4CE528002B73ED /* AFHTTPRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperation.h; sourceTree = ""; }; 13A9518E1B4CE528002B73ED /* AFHTTPRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPRequestOperation.m; sourceTree = ""; }; 13A9518F1B4CE528002B73ED /* AFHTTPRequestOperationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperationManager.h; sourceTree = ""; }; @@ -2868,6 +2871,8 @@ 138EDD461AD7B0A30020957C /* NSString+LCExtension.m */, 138EDD471AD7B0A30020957C /* UIView+LCUIAnimation.h */, 138EDD481AD7B0A30020957C /* UIView+LCUIAnimation.m */, + 139C71281B54CAE60051B2C3 /* NSNull+LCExtension.h */, + 139C71291B54CAE60051B2C3 /* NSNull+LCExtension.m */, ); path = Extension; sourceTree = ""; @@ -3442,6 +3447,27 @@ path = BLKFlexibleHeightBar; sourceTree = ""; }; + 139C712C1B55195A0051B2C3 /* Views(UserCenter) */ = { + isa = PBXGroup; + children = ( + ); + name = "Views(UserCenter)"; + sourceTree = ""; + }; + 139C712D1B5519760051B2C3 /* Views(Link) */ = { + isa = PBXGroup; + children = ( + ); + name = "Views(Link)"; + sourceTree = ""; + }; + 139C712F1B55198D0051B2C3 /* Extension */ = { + isa = PBXGroup; + children = ( + ); + name = Extension; + sourceTree = ""; + }; 13B6C19A1AE8FFBE008912C0 /* Welcome */ = { isa = PBXGroup; children = ( @@ -4202,7 +4228,10 @@ 13FCC06E1ADE16C00008DB41 /* UserCenter */ = { isa = PBXGroup; children = ( - 13FCC0861ADE40790008DB41 /* Views */, + 139C712F1B55198D0051B2C3 /* Extension */, + 139C712D1B5519760051B2C3 /* Views(Link) */, + 139C712C1B55195A0051B2C3 /* Views(UserCenter) */, + 13FCC0861ADE40790008DB41 /* Views(Cell) */, 13FCC06F1ADE16DD0008DB41 /* LKUserCenterViewController.h */, 13FCC0701ADE16DD0008DB41 /* LKUserCenterViewController.m */, 13DEEBFF1AE7723F005E01A6 /* LKSettingsViewController.h */, @@ -4223,7 +4252,7 @@ path = Pullloader; sourceTree = ""; }; - 13FCC0861ADE40790008DB41 /* Views */ = { + 13FCC0861ADE40790008DB41 /* Views(Cell) */ = { isa = PBXGroup; children = ( 13FCC0871ADE40AC0008DB41 /* LKUserCenterPhotoCell.h */, @@ -4231,6 +4260,7 @@ 13E1A2C91AE6439F00E24C3C /* LKUserCenterUserCell.h */, 13E1A2CA1AE6439F00E24C3C /* LKUserCenterUserCell.m */, ); + name = "Views(Cell)"; path = Views; sourceTree = ""; }; @@ -4905,6 +4935,7 @@ 13D2ACD11AFB18E40068C0CD /* GPUImageChromaKeyBlendFilter.m in Sources */, 138EDE9E1AD7B0A30020957C /* UIView+LCFrameLayout.m in Sources */, 13D2AD3B1AFB18E40068C0CD /* GPUImageSaturationFilter.m in Sources */, + 139C712A1B54CAE60051B2C3 /* NSNull+LCExtension.m in Sources */, 13D2ACCD1AFB18E40068C0CD /* GPUImageBuffer.m in Sources */, 138EDE7F1AD7B0A30020957C /* LCKeychain.m in Sources */, 13BCD88A1ADBA92200A0CBF5 /* POPAnimatableProperty.mm in Sources */, @@ -5184,7 +5215,7 @@ OTHER_LDFLAGS = "-all_load"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = "aa713228-579f-4fb3-94ec-34f1f86ba5fe"; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; }; name = Debug; }; @@ -5220,7 +5251,7 @@ OTHER_LDFLAGS = "-all_load"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = "aa713228-579f-4fb3-94ec-34f1f86ba5fe"; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; }; name = Release; }; diff --git a/LIKE/LIKE/AppDelegate.m b/LIKE/LIKE/AppDelegate.m index 6db80b8..6083fa6 100755 --- a/LIKE/LIKE/AppDelegate.m +++ b/LIKE/LIKE/AppDelegate.m @@ -9,7 +9,6 @@ #import "AppDelegate.h" #import "LKLoginViewController.h" #import "LCCMD.h" -#import "LKAssistiveTouchButton.h" #import "LKWelcome.h" #import "MobClick.h" #import "LKWeChatShare.h" @@ -18,9 +17,7 @@ #import #import "LKNotificationCount.h" #import -#import "LKLocationManager.h" #import -#import "LCUIImageLoadConnection.h" @interface AppDelegate () @@ -113,7 +110,7 @@ -(void) load:(NSDictionary *)launchOptions } } -- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window +- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window { return UIInterfaceOrientationMaskPortrait; } @@ -238,12 +235,6 @@ -(void) handleNotification:(NSNotification *)notification [self request:interface complete:^(LKHttpRequestResult * result) { -// if (result.state == LKHttpRequestStateFinished) { -// -// [LCUIAlertView showWithTitle:@"" message:notification.object cancelTitle:@"ok" otherTitle:nil didTouchedBlock:^(NSInteger integerValue) { -// -// }]; -// } }]; } @@ -253,9 +244,6 @@ -(void) handleNotification:(NSNotification *)notification } else if ([notification is:LCUIApplicationDidReceiveRemoteNotification]){ -// [LCUIAlertView showWithTitle:@"" message:[notification.object description] cancelTitle:@"ok" otherTitle:nil didTouchedBlock:^(NSInteger integerValue) { -// -// }]; } } @@ -283,7 +271,10 @@ - (void)application:(UIApplication *)application didReceiveRemoteNotification:(N // app was already in the foreground }else{ - [self.home performSelector:@selector(notificationAction) withObject:nil afterDelay:0.5]; + if (LKLocalUser.singleton.isLogin) { + + [self.home performSelector:@selector(notificationAction) withObject:nil afterDelay:0.5]; + } } } diff --git a/LIKE/LIKE/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png b/LIKE/LIKE/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png index da89f83..87a64c8 100644 Binary files a/LIKE/LIKE/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png and b/LIKE/LIKE/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png differ diff --git a/LIKE/LIKE/Images.xcassets/AppIcon.appiconset/icon-29.png b/LIKE/LIKE/Images.xcassets/AppIcon.appiconset/icon-29.png index d030108..327828d 100644 Binary files a/LIKE/LIKE/Images.xcassets/AppIcon.appiconset/icon-29.png and b/LIKE/LIKE/Images.xcassets/AppIcon.appiconset/icon-29.png differ diff --git a/LIKE/LIKE/Images.xcassets/AppIcon.appiconset/icon-76@2x.png b/LIKE/LIKE/Images.xcassets/AppIcon.appiconset/icon-76@2x.png index 84c1fc0..68cad64 100644 Binary files a/LIKE/LIKE/Images.xcassets/AppIcon.appiconset/icon-76@2x.png and b/LIKE/LIKE/Images.xcassets/AppIcon.appiconset/icon-76@2x.png differ diff --git a/LIKE/LIKE/Info.plist b/LIKE/LIKE/Info.plist index f4b4cd2..6f6d9bc 100755 --- a/LIKE/LIKE/Info.plist +++ b/LIKE/LIKE/Info.plist @@ -74,7 +74,7 @@ CFBundleVersion - 1.0.9.1 + 1.0.9.5 FacebookAppID 368579790017819 FacebookDisplayName diff --git a/LIKE/LIKE/LCFramework/Debugger/LCDebugger/CMD/LCUIKeyBoard.m b/LIKE/LIKE/LCFramework/Debugger/LCDebugger/CMD/LCUIKeyBoard.m index 1da87a2..237bb8a 100755 --- a/LIKE/LIKE/LCFramework/Debugger/LCDebugger/CMD/LCUIKeyBoard.m +++ b/LIKE/LIKE/LCFramework/Debugger/LCDebugger/CMD/LCUIKeyBoard.m @@ -33,7 +33,7 @@ #import "LCUIKeyBoard.h" #import "LCDebuggerImport.h" -#define DEFAULT_KEYBOARD_HEIGHT (216.0f) +#define DEFAULT_KEYBOARD_HEIGHT (258.0f) @interface LCUIKeyBoard () { @@ -63,6 +63,9 @@ -(id) init [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleNotification:) name:UIKeyboardDidShowNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleNotification:) name:UIKeyboardDidHideNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleNotification:) name:UIKeyboardWillChangeFrameNotification object:nil]; + + UITextField * field = [[UITextField alloc] init]; + [field becomeFirstResponder]; }); } diff --git a/LIKE/LIKE/LCFramework/Foundation/Extension/NSNull+LCExtension.h b/LIKE/LIKE/LCFramework/Foundation/Extension/NSNull+LCExtension.h new file mode 100644 index 0000000..47ac55e --- /dev/null +++ b/LIKE/LIKE/LCFramework/Foundation/Extension/NSNull+LCExtension.h @@ -0,0 +1,17 @@ +// +// NSNull+LCExtension.h +// LIKE +// +// Created by Licheng Guo ( http://nsobjet.me ) on 15/7/14. +// Copyright (c) 2015年 Beijing Like Technology Co.Ltd . ( http://www.likeorz.com ). All rights reserved. +// + +#import + +@interface NSNull (LCExtension) + +LC_PROPERTY(readonly) NSInteger integerValue; +LC_PROPERTY(readonly) int intValue; +LC_PROPERTY(readonly) NSInteger length; + +@end diff --git a/LIKE/LIKE/LCFramework/Foundation/Extension/NSNull+LCExtension.m b/LIKE/LIKE/LCFramework/Foundation/Extension/NSNull+LCExtension.m new file mode 100644 index 0000000..e59029a --- /dev/null +++ b/LIKE/LIKE/LCFramework/Foundation/Extension/NSNull+LCExtension.m @@ -0,0 +1,29 @@ +// +// NSNull+LCExtension.m +// LIKE +// +// Created by Licheng Guo ( http://nsobjet.me ) on 15/7/14. +// Copyright (c) 2015年 Beijing Like Technology Co.Ltd . ( http://www.likeorz.com ). All rights reserved. +// + +#import "NSNull+LCExtension.h" + +@implementation NSNull (LCExtension) + +-(NSInteger) integerValue +{ + return 0; +} + +-(int) intValue +{ + return 0; +} + +-(NSInteger) length +{ + return 0; +} + + +@end diff --git a/LIKE/LIKE/LCFramework/UIKit/LCUIViewController.h b/LIKE/LIKE/LCFramework/UIKit/LCUIViewController.h index 4df59b7..4628116 100755 --- a/LIKE/LIKE/LCFramework/UIKit/LCUIViewController.h +++ b/LIKE/LIKE/LCFramework/UIKit/LCUIViewController.h @@ -12,6 +12,8 @@ @interface LCUIViewController : UIViewController +LC_PROPERTY(assign) BOOL isCurrentDisplayController; + -(void) buildUI; @end diff --git a/LIKE/LIKE/LCFramework/UIKit/LCUIViewController.m b/LIKE/LIKE/LCFramework/UIKit/LCUIViewController.m index dad886b..464c4eb 100755 --- a/LIKE/LIKE/LCFramework/UIKit/LCUIViewController.m +++ b/LIKE/LIKE/LCFramework/UIKit/LCUIViewController.m @@ -16,6 +16,21 @@ @interface LCUIViewController () @implementation LCUIViewController +-(void) viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; + + self.isCurrentDisplayController = YES; +} + +-(void) viewWillDisappear:(BOOL)animated +{ + [super viewWillDisappear:animated]; + + self.isCurrentDisplayController = NO; +} + + -(void) dealloc { [self cancelAllRequests]; diff --git a/LIKE/LIKE/LKApplication/Application/Home/LKHomeViewController.m b/LIKE/LIKE/LKApplication/Application/Home/LKHomeViewController.m index 31b4a20..4e7918a 100644 --- a/LIKE/LIKE/LKApplication/Application/Home/LKHomeViewController.m +++ b/LIKE/LIKE/LKApplication/Application/Home/LKHomeViewController.m @@ -54,6 +54,12 @@ @interface LKHomeViewController () +#import "MobClick.h" @implementation LKTencentShare @@ -48,6 +49,8 @@ +(BOOL) shareImage:(UIImage *)image //将内容分享到qq [QQApiInterface sendReq:req]; + [MobClick event:@"4"]; + return YES; } diff --git a/LIKE/LIKE/LKApplication/Model/LKWeChatShare.m b/LIKE/LIKE/LKApplication/Model/LKWeChatShare.m index 7d076eb..c2ce264 100644 --- a/LIKE/LIKE/LKApplication/Model/LKWeChatShare.m +++ b/LIKE/LIKE/LKApplication/Model/LKWeChatShare.m @@ -7,6 +7,7 @@ // #import "LKWeChatShare.h" +#import "MobClick.h" @interface LKWeChatShare () @@ -52,11 +53,13 @@ +(BOOL) shareImage:(UIImage *)image timeLine:(BOOL)timeLine message.mediaObject = ext; - SendMessageToWXReq* req = [[SendMessageToWXReq alloc] init]; + SendMessageToWXReq * req = [[SendMessageToWXReq alloc] init]; req.bText = NO; req.message = message; req.scene = timeLine ? WXSceneTimeline : WXSceneSession; + [MobClick event:timeLine ? @"2" : @"3"]; + return [WXApi sendReq:req]; } diff --git a/LIKE/LIKE/LKApplication/Network/LKNetworkCenter.m b/LIKE/LIKE/LKApplication/Network/LKNetworkCenter.m index b80b89c..3cf17d8 100755 --- a/LIKE/LIKE/LKApplication/Network/LKNetworkCenter.m +++ b/LIKE/LIKE/LKApplication/Network/LKNetworkCenter.m @@ -240,7 +240,11 @@ -(void) handleUpdate:(LCHTTPRequestResult *)requestResult complete:(LKHTTPReques if (!errMessage || errMessage.length == 0) { - errMessage = LC_NSSTRING_FORMAT(@"发生了一个错误,但是这个错误没有详细的描述。"); + errMessage = LC_NSSTRING_FORMAT(@"Some error occurred%@, but there's no description about it.", returnObject[@"code"] ? [NSString stringWithFormat:@"(%@)", returnObject[@"code"]] : @""); + } + else{ + + //errMessage = [NSString stringWithFormat:@"%@ (%@)",returnObject[@"message"], returnObject[@"code"]]; } result.state = LKHttpRequestStateFailed; diff --git a/LIKE/LIKE/LKTabBarController.mm b/LIKE/LIKE/LKTabBarController.mm index cf6f0c5..a3897a8 100755 --- a/LIKE/LIKE/LKTabBarController.mm +++ b/LIKE/LIKE/LKTabBarController.mm @@ -8,7 +8,6 @@ #import "LKTabBarController.h" #import "AppDelegate.h" -#import "LKCameraViewController.h" #import "LKLoginViewController.h" #import "LKAssistiveTouchButton.h" #import "MMMaterialDesignSpinner.h"