This commit is contained in:
wu736139669
2015-06-09 15:30:50 +08:00
parent 8928c4d01b
commit 6ade6fedfb
11 changed files with 60 additions and 13 deletions
+2 -2
View File
@@ -1714,7 +1714,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -1749,7 +1749,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
@@ -2146,5 +2146,37 @@
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/ViewControllers/Main/NoteViewController.m"
timestampString = "455345345.148527"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "49"
endingLineNumber = "49"
landmarkName = "-viewDidLoad"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/ViewModels/My/UpdateViewModel.m"
timestampString = "455345454.899632"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "41"
endingLineNumber = "41"
landmarkName = "+requireUpdate"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
+1 -1
View File
@@ -23,7 +23,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -131,8 +131,8 @@
DLog(@"%@",viewModel);
UpdateViewModel* updateViewModel = (UpdateViewModel*)viewModel;
if ([updateViewModel success]) {
[AWordDefault setLastUpdateTime:now];
if (updateViewModel.update==NO) {
if (updateViewModel.needUpdate==1) {
[AWordDefault setLastUpdateTime:now];
UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil message:updateViewModel.version_info delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确认", nil];
[alertView show];
}
@@ -14,6 +14,7 @@
#import "UserViewModel.h"
#import "CommentViewModel.h"
#import "CommentTableViewCell.h"
#import "PraiseUserListViewController.h"
@interface NoteCommentViewController ()<UITableViewDelegate,UITableViewDataSource>
{
NoteTableViewCell* _headView;
@@ -51,6 +52,15 @@
_commentGoodListCellTableViewCell = [Ash_UIUtil instanceXibView:@"CommentGoodListCellTableViewCell"];
_commentGoodListCellTableViewCell.frame = CGRectMake(0, height, kScreenWidth, 80);
__weak NoteCommentViewController* weakSelf = self;
[_commentGoodListCellTableViewCell setShowPraiseList:^(void){
PraiseUserListViewController *praiseUserListViewController = [[PraiseUserListViewController alloc] init];
praiseUserListViewController.hidesBottomBarWhenPushed = YES;
praiseUserListViewController.recordId = weakSelf.text_image.messageId;
[weakSelf.navigationController pushViewController:praiseUserListViewController animated:YES];
}
];
[tableHeadView addSubview:_commentGoodListCellTableViewCell];
self.tableView.tableHeaderView = tableHeadView;
@@ -72,7 +82,6 @@
_commentTextView = [Ash_UIUtil instanceXibView:@"CommentTextView"];
_commentTextView.frame = self.view.frame;
__weak id weakSelf = self;
[_commentTextView setComentComplete:^(){
_isFirstLoad = YES;
[weakSelf headerBeginRefreshing];
@@ -34,7 +34,7 @@
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LoG-6c-iVd">
<rect key="frame" x="8" y="9" width="304" height="30"/>
<rect key="frame" x="8" y="5" width="304" height="35"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<rect key="contentStretch" x="0.5" y="0.5" width="0.5" height="0.5"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
@@ -55,8 +55,8 @@
<constraint firstAttribute="height" constant="44" id="XhR-hh-n0j"/>
<constraint firstItem="LoG-6c-iVd" firstAttribute="leading" secondItem="r5a-d5-WZQ" secondAttribute="leading" constant="8" id="m2l-n5-FSN"/>
<constraint firstItem="Q7M-ao-nkc" firstAttribute="leading" secondItem="r5a-d5-WZQ" secondAttribute="leading" id="n0H-cg-00e"/>
<constraint firstItem="LoG-6c-iVd" firstAttribute="top" secondItem="Q7M-ao-nkc" secondAttribute="bottom" constant="8" id="vpe-yl-926"/>
<constraint firstAttribute="bottom" secondItem="LoG-6c-iVd" secondAttribute="bottom" constant="5" id="ztc-Jx-KGW"/>
<constraint firstItem="LoG-6c-iVd" firstAttribute="top" secondItem="Q7M-ao-nkc" secondAttribute="bottom" constant="4" id="vpe-yl-926"/>
<constraint firstAttribute="bottom" secondItem="LoG-6c-iVd" secondAttribute="bottom" constant="4" id="ztc-Jx-KGW"/>
<constraint firstAttribute="trailing" secondItem="LoG-6c-iVd" secondAttribute="trailing" constant="8" id="zuv-Pq-lj8"/>
</constraints>
</view>
@@ -112,7 +112,7 @@
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 0.01;
return 10.0;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
+1 -1
View File
@@ -9,7 +9,7 @@
#import "BaseViewModel.h"
@interface UpdateViewModel : BaseViewModel
@property(assign,nonatomic)BOOL update;
@property(assign,nonatomic)NSInteger needUpdate; //是否需要更新
@property(readonly,nonatomic)NSString* version;
@property(readonly,nonatomic)NSString* version_info;
+2 -2
View File
@@ -11,7 +11,7 @@
@implementation UpdateViewModel
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
NSMutableDictionary* dic = [NSMutableDictionary dictionaryWithDictionary:[super JSONKeyPathsByPropertyKey]];
[dic setObject:@"update" forKey:@"update"];
[dic setObject:@"need_update" forKey:@"needUpdate"];
[dic setObject:@"version" forKey:@"version"];
[dic setObject:@"version_info" forKey:@"version_info"];
@@ -32,7 +32,7 @@
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
NSString *buildVersion = [infoDictionary objectForKey:@"CFBundleVersion"];
NSString *version = [NSString stringWithFormat:@"v%@.%@",app_Version, buildVersion];
NSString *version = [NSString stringWithFormat:@"%@.%@",app_Version, buildVersion];
PropertyEntity *pro = [[PropertyEntity alloc] init];
pro.requireType = HTTPRequestTypeWithPOST;
@@ -8,7 +8,10 @@
#import <UIKit/UIKit.h>
typedef void (^ShowPraiseList)(void);
@interface CommentGoodListCellTableViewCell : UITableViewCell
@property (strong, nonatomic)ShowPraiseList showPraiseList;
@property (weak, nonatomic) IBOutlet UIImageView *barBtImageView;
- (IBAction)showMoreBtnClick:(id)sender;
@@ -23,6 +23,9 @@
}
- (IBAction)showMoreBtnClick:(id)sender {
if (_showPraiseList) {
_showPraiseList();
}
}
-(void)setUserInfoArr:(NSArray *)userInfoArr