Skip to content

Commit

Permalink
Fix bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
titman committed Jul 14, 2015
1 parent 2700bd8 commit effb876
Show file tree
Hide file tree
Showing 22 changed files with 162 additions and 31 deletions.
39 changes: 35 additions & 4 deletions LIKE/LIKE.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -1307,6 +1308,8 @@
139B069F1ADBF50F006A260F /* UIView+BLKFlexibleHeightBarSubview.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+BLKFlexibleHeightBarSubview.m"; sourceTree = "<group>"; };
139B06A71ADBF577006A260F /* LKHomepageHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LKHomepageHeader.h; sourceTree = "<group>"; };
139B06A81ADBF577006A260F /* LKHomepageHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LKHomepageHeader.m; sourceTree = "<group>"; };
139C71281B54CAE60051B2C3 /* NSNull+LCExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNull+LCExtension.h"; sourceTree = "<group>"; };
139C71291B54CAE60051B2C3 /* NSNull+LCExtension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNull+LCExtension.m"; sourceTree = "<group>"; };
13A9518D1B4CE528002B73ED /* AFHTTPRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperation.h; sourceTree = "<group>"; };
13A9518E1B4CE528002B73ED /* AFHTTPRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPRequestOperation.m; sourceTree = "<group>"; };
13A9518F1B4CE528002B73ED /* AFHTTPRequestOperationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperationManager.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -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 = "<group>";
Expand Down Expand Up @@ -3442,6 +3447,27 @@
path = BLKFlexibleHeightBar;
sourceTree = "<group>";
};
139C712C1B55195A0051B2C3 /* Views(UserCenter) */ = {
isa = PBXGroup;
children = (
);
name = "Views(UserCenter)";
sourceTree = "<group>";
};
139C712D1B5519760051B2C3 /* Views(Link) */ = {
isa = PBXGroup;
children = (
);
name = "Views(Link)";
sourceTree = "<group>";
};
139C712F1B55198D0051B2C3 /* Extension */ = {
isa = PBXGroup;
children = (
);
name = Extension;
sourceTree = "<group>";
};
13B6C19A1AE8FFBE008912C0 /* Welcome */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -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 */,
Expand All @@ -4223,14 +4252,15 @@
path = Pullloader;
sourceTree = "<group>";
};
13FCC0861ADE40790008DB41 /* Views */ = {
13FCC0861ADE40790008DB41 /* Views(Cell) */ = {
isa = PBXGroup;
children = (
13FCC0871ADE40AC0008DB41 /* LKUserCenterPhotoCell.h */,
13FCC0881ADE40AC0008DB41 /* LKUserCenterPhotoCell.m */,
13E1A2C91AE6439F00E24C3C /* LKUserCenterUserCell.h */,
13E1A2CA1AE6439F00E24C3C /* LKUserCenterUserCell.m */,
);
name = "Views(Cell)";
path = Views;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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;
};
Expand Down Expand Up @@ -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;
};
Expand Down
19 changes: 5 additions & 14 deletions LIKE/LIKE/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -18,9 +17,7 @@
#import <TencentOpenAPI/TencentOAuth.h>
#import "LKNotificationCount.h"
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import "LKLocationManager.h"
#import <MAMapKit/MAMapKit.h>
#import "LCUIImageLoadConnection.h"

@interface AppDelegate () <LC_CMD_IMP>

Expand Down Expand Up @@ -113,7 +110,7 @@ -(void) load:(NSDictionary *)launchOptions
}
}

- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
return UIInterfaceOrientationMaskPortrait;
}
Expand Down Expand Up @@ -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) {
//
// }];
// }
}];

}
Expand All @@ -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) {
//
// }];
}
}

Expand Down Expand Up @@ -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];
}
}
}

Expand Down
Binary file modified LIKE/LIKE/Images.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified LIKE/LIKE/Images.xcassets/AppIcon.appiconset/icon-29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified LIKE/LIKE/Images.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion LIKE/LIKE/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.0.9.1</string>
<string>1.0.9.5</string>
<key>FacebookAppID</key>
<string>368579790017819</string>
<key>FacebookDisplayName</key>
Expand Down
5 changes: 4 additions & 1 deletion LIKE/LIKE/LCFramework/Debugger/LCDebugger/CMD/LCUIKeyBoard.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#import "LCUIKeyBoard.h"
#import "LCDebuggerImport.h"

#define DEFAULT_KEYBOARD_HEIGHT (216.0f)
#define DEFAULT_KEYBOARD_HEIGHT (258.0f)

@interface LCUIKeyBoard ()
{
Expand Down Expand Up @@ -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];
});
}

Expand Down
17 changes: 17 additions & 0 deletions LIKE/LIKE/LCFramework/Foundation/Extension/NSNull+LCExtension.h
Original file line number Diff line number Diff line change
@@ -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 <Foundation/Foundation.h>

@interface NSNull (LCExtension)

LC_PROPERTY(readonly) NSInteger integerValue;
LC_PROPERTY(readonly) int intValue;
LC_PROPERTY(readonly) NSInteger length;

@end
29 changes: 29 additions & 0 deletions LIKE/LIKE/LCFramework/Foundation/Extension/NSNull+LCExtension.m
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions LIKE/LIKE/LCFramework/UIKit/LCUIViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

@interface LCUIViewController : UIViewController

LC_PROPERTY(assign) BOOL isCurrentDisplayController;

-(void) buildUI;

@end
15 changes: 15 additions & 0 deletions LIKE/LIKE/LCFramework/UIKit/LCUIViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
35 changes: 32 additions & 3 deletions LIKE/LIKE/LKApplication/Application/Home/LKHomeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ @interface LKHomeViewController () <UITableViewDataSource,UITableViewDelegate,UI

LC_PROPERTY(copy) NSString * next;


// - - - - - - -
LC_PROPERTY(strong) LKSearchViewController * searchViewController;
LC_PROPERTY(strong) LKNotificationViewController * notificationViewController;


@end

@implementation LKHomeViewController
Expand Down Expand Up @@ -336,13 +342,25 @@ -(void) buildUI

@normally(self);

self.canResignFirstResponder = @(NO);

// scroll...
LKHomeTableViewCell * cell = (LKHomeTableViewCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:self.inputView.tag inSection:1]];

[self.tableView setContentOffset:LC_POINT(0, cell.viewFrameY - 64 + 55 + cell.contentBack.viewFrameHeight - LCUIKeyBoard.singleton.height + (cell.tagsView.viewFrameHeight - 55) + 16) animated:YES];
// CGRect originRect = cell.frame;
//
//
CGFloat height1 = LC_DEVICE_HEIGHT - cell.viewFrameHeight;
CGFloat height2 = LCUIKeyBoard.singleton.height + self.inputView.viewFrameHeight - height1;

// CGFloat y = LC_DEVICE_HEIGHT + 20 - self.inputView.viewFrameHeight - LCUIKeyBoard.singleton.height - cell.viewFrameHeight;
//
// CGRect rect = [self.view convertRect:CGRectMake(0, y, cell.viewFrameWidth, cell.viewFrameHeight) toView:self.tableView];

//CGRect rect = [cell convertRect:originRect toView:self.view];
//CGFloat height = (LC_DEVICE_HEIGHT + 64) - (originRect.size.height + self.inputView.viewFrameHeight + LCUIKeyBoard.singleton.height);

[self.tableView setContentOffset:LC_POINT(0, cell.viewFrameY + height2 - 25 + 10) animated:YES];

self.canResignFirstResponder = @(NO);
[self performSelector:@selector(setCanResignFirstResponder:) withObject:@(YES) afterDelay:1];
};

Expand Down Expand Up @@ -539,6 +557,8 @@ -(void) searchAction

LKSearchViewController * view = LKSearchViewController.view;

self.searchViewController = view;

[view showInViewController:self];

@weakly(self);
Expand All @@ -556,6 +576,7 @@ -(void) searchAction

} completion:^(BOOL finished) {

self.searchViewController = nil;
}];

};
Expand All @@ -568,6 +589,14 @@ -(void) searchAction

-(void) notificationAction
{
if (!self.isCurrentDisplayController) {
return;
}

if (self.searchViewController) {
[self.searchViewController hide];
}

[self.inputView resignFirstResponder];

if(![LKLoginViewController needLoginOnViewController:[LCUIApplication sharedInstance].window.rootViewController]){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ -(void) loadBigImage
self.post.place = [result.json[@"data"][@"place"] isKindOfClass:[NSString class]] ? result.json[@"data"][@"place"] : nil;
self.post.timestamp = result.json[@"data"][@"created"];
//self.post.content = result.json[@"data"][@"content"];
self.bigContentURL = self.post.content;
self.bigContentURL = result.json[@"data"][@"content"];

UIImage * image = [LCUIImageCache.singleton imageWithKey:self.bigContentURL];

Expand Down Expand Up @@ -739,7 +739,7 @@ - (UITableViewCell *)tableView:(LCUITableView *)tableView cellForRowAtIndexPath:
self.userName = LCUILabel.view;
self.userName.viewFrameY = 11;
self.userName.viewFrameX = self.userHead.viewRightX + 10;
self.userName.viewFrameWidth = LC_DEVICE_WIDTH - self.userName.viewFrameX - 65;
self.userName.viewFrameWidth = LC_DEVICE_WIDTH - self.userName.viewFrameX - 75;
self.userName.viewFrameHeight = 15;
self.userName.textAlignment = UITextAlignmentLeft;
self.userName.font = LK_FONT(13);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ -(void) buildUI
self.headImageView.cornerRadius = self.headImageView.viewMidWidth;
self.headImageView.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.5];
self.headImageView.userInteractionEnabled = YES;
self.headImageView.contentMode = UIViewContentModeScaleAspectFill;
[self.headImageView addTapGestureRecognizer:self selector:@selector(handleHeadTap)];
self.ADD(self.headImageView);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ -(void) sure
self.sureButton.title = LC_LO(@"修改中...");
self.sureButton.userInteractionEnabled = NO;

LKHttpRequestInterface * interface = [LKHttpRequestInterface interfaceType:@"link/mobile"].POST_METHOD();
LKHttpRequestInterface * interface = [LKHttpRequestInterface interfaceType:@"account/link/mobile"].AUTO_SESSION().POST_METHOD();

[interface addParameter:[LKISOCountryCodes countryWithCode:self.countryCode.text] key:@"zone"];
[interface addParameter:self.phoneField.text key:@"mobile"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ - (UITableViewCell *)tableView:(LCUITableView *)tableView cellForRowAtIndexPath:

configurationCell.backgroundColor = [UIColor clearColor];
configurationCell.contentView.backgroundColor = [UIColor clearColor];
configurationCell.selectedViewColor = LKColor.backgroundColor;

LCUIButton * icon = LCUIButton.view;
icon.viewFrameX = 40;
Expand Down
Loading

0 comments on commit effb876

Please sign in to comment.