diff --git a/ManagerDemo.xcworkspace/xcshareddata/ManagerDemo.xccheckout b/ManagerDemo.xcworkspace/xcshareddata/ManagerDemo.xccheckout index fcfd944..d9f3c69 100644 --- a/ManagerDemo.xcworkspace/xcshareddata/ManagerDemo.xccheckout +++ b/ManagerDemo.xcworkspace/xcshareddata/ManagerDemo.xccheckout @@ -5,7 +5,7 @@ IDESourceControlProjectFavoriteDictionaryKey IDESourceControlProjectIdentifier - D7A72B7F-6544-436C-AC15-3ED04A1E562D + F9CCD56F-A331-4F6E-AB51-4F0CE7AE5C12 IDESourceControlProjectName ManagerDemo IDESourceControlProjectOriginsDictionary diff --git a/ManagerDemo.xcworkspace/xcuserdata/xmfish.xcuserdatad/UserInterfaceState.xcuserstate b/ManagerDemo.xcworkspace/xcuserdata/xmfish.xcuserdatad/UserInterfaceState.xcuserstate index 0832d3d..3129200 100644 Binary files a/ManagerDemo.xcworkspace/xcuserdata/xmfish.xcuserdatad/UserInterfaceState.xcuserstate and b/ManagerDemo.xcworkspace/xcuserdata/xmfish.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ManagerDemo/MainView/ListView/ListViewController.m b/ManagerDemo/MainView/ListView/ListViewController.m index 8e8adfd..acddc97 100644 --- a/ManagerDemo/MainView/ListView/ListViewController.m +++ b/ManagerDemo/MainView/ListView/ListViewController.m @@ -68,7 +68,6 @@ } -(void)firstRefresh { - NSLog(@"%d",_productInfoArray.count); if ([_productInfoArray count] <= 0) { [self headerBeginRefreshing]; } diff --git a/ManagerDemo/MainView/ListView/LoanListCell.m b/ManagerDemo/MainView/ListView/LoanListCell.m index 9d1be1c..29b1ff3 100644 --- a/ManagerDemo/MainView/ListView/LoanListCell.m +++ b/ManagerDemo/MainView/ListView/LoanListCell.m @@ -45,7 +45,7 @@ } -(void)setPercent:(NSInteger) percent { - NSString* htmlStr = [NSString stringWithFormat:@"%d %%",percent]; + NSString* htmlStr = [NSString stringWithFormat:@"%ld %%",percent]; NSData *data = [htmlStr dataUsingEncoding:NSUTF8StringEncoding]; NSDictionary* optionsDic = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:kCTTextAlignmentCenter],DTDefaultTextAlignment, nil]; NSAttributedString *percentString = [[NSAttributedString alloc] initWithHTMLData:data options:optionsDic documentAttributes:nil]; @@ -72,18 +72,18 @@ -(void)setInfoDic:(NSDictionary *)dic { - self.productId = [dic objectForKey:@"id"]; - self.profitLabel.text = [NSString stringWithFormat:@"%.2f%%",[[dic objectForKey:@"nhsy"] floatValue]]; - self.nameLabel.text = [dic objectForKey:@"proName"]; - if ([[dic objectForKey:@"tip"] isKindOfClass:[NSNull class]]) { + self.productId = [dic objectForKeyWithoutNull:@"id"]; + self.profitLabel.text = [NSString stringWithFormat:@"%.2f%%",[[dic objectForKeyWithoutNull:@"nhsy"] floatValue]]; + self.nameLabel.text = [dic objectForKeyWithoutNull:@"proName"]; + if ([[dic objectForKeyWithoutNull:@"tip"] isKindOfClass:[NSNull class]]) { self.typeLabel.text = @""; }else{ - self.typeLabel.text = [dic objectForKey:@"tip"]; + self.typeLabel.text = [dic objectForKeyWithoutNull:@"tip"]; } // if ([[dic objectForKey:@"state"] integerValue] == 1 ) { - [self setPercent:[[dic objectForKey:@"percent"] floatValue]]; - [self setStartBuy:[[dic objectForKey:@"startBuy"] integerValue]]; - NSString* timeStr = [NSString stringWithFormat:@"%@个月起",[dic objectForKey:@"timeLimit"]]; + [self setPercent:[[dic objectForKeyWithoutNull:@"percent"] floatValue]]; + [self setStartBuy:[[dic objectForKeyWithoutNull:@"startBuy"] integerValue]]; + NSString* timeStr = [NSString stringWithFormat:@"%@个月起",[dic objectForKeyWithoutNull:@"timeLimit"]]; [self setTimeWithString:timeStr]; // } // else if([[dic objectForKey:@"state"] integerValue] == 2){