mirror of
https://github.com/wu736139669/ManagerDemo.git
synced 2026-08-05 05:55:42 +00:00
wyd complete
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
A90BEC02199DDA9E00230242 /* WYDProductViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A90BEC00199DDA9E00230242 /* WYDProductViewController.xib */; };
|
||||
A90BEC05199DDACA00230242 /* WYDInfoHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = A90BEC04199DDACA00230242 /* WYDInfoHeadView.m */; };
|
||||
A90BEC07199DDAFB00230242 /* WYDInfoHeadView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A90BEC06199DDAFB00230242 /* WYDInfoHeadView.xib */; };
|
||||
A91C6D4019AB8E9C00AEBF4D /* p2c_alert@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A91C6D3D19AB8E9C00AEBF4D /* p2c_alert@2x.png */; };
|
||||
A91C6D4119AB8E9C00AEBF4D /* p2c_datesum@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A91C6D3E19AB8E9C00AEBF4D /* p2c_datesum@2x.png */; };
|
||||
A91C6D4219AB8E9C00AEBF4D /* p2c_safeicon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A91C6D3F19AB8E9C00AEBF4D /* p2c_safeicon@2x.png */; };
|
||||
A9233E64199CA44700DA80D8 /* more_icon_5@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9233E63199CA44700DA80D8 /* more_icon_5@2x.png */; };
|
||||
A93F87741999AA8300875287 /* ManagerUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = A93F87731999AA8300875287 /* ManagerUtil.m */; };
|
||||
A93F877C1999ACF600875287 /* MBProgressHUD+Util.m in Sources */ = {isa = PBXBuildFile; fileRef = A93F877B1999ACF600875287 /* MBProgressHUD+Util.m */; };
|
||||
@@ -107,6 +110,7 @@
|
||||
A9E76DD519AB378A00C0D232 /* hk_home_icon1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9E76DD219AB378A00C0D232 /* hk_home_icon1@2x.png */; };
|
||||
A9E76DD619AB378A00C0D232 /* hk_home_icon2@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9E76DD319AB378A00C0D232 /* hk_home_icon2@2x.png */; };
|
||||
A9E76DD719AB378A00C0D232 /* hk_home_icon3@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9E76DD419AB378A00C0D232 /* hk_home_icon3@2x.png */; };
|
||||
A9E8589D19AC2AAE001996DF /* DaiDaiTongApi.m in Sources */ = {isa = PBXBuildFile; fileRef = A9E8589C19AC2AAE001996DF /* DaiDaiTongApi.m */; };
|
||||
A9EAA035199857F5001A872A /* HomeMainView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9EAA034199857F5001A872A /* HomeMainView.m */; };
|
||||
A9EAA04019985EDE001A872A /* HomeMainView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9EAA03F19985EDE001A872A /* HomeMainView.xib */; };
|
||||
A9EAA04519986DC3001A872A /* fund_cell_label_bg_blue@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9EAA04119986DC3001A872A /* fund_cell_label_bg_blue@2x.png */; };
|
||||
@@ -120,6 +124,8 @@
|
||||
A9EAA052199879CC001A872A /* pie_chart_center@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9EAA051199879CC001A872A /* pie_chart_center@2x.png */; };
|
||||
A9EAA05619988C55001A872A /* MRCircularProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9EAA05519988C55001A872A /* MRCircularProgressView.m */; };
|
||||
A9EAA05F1998BB82001A872A /* about_dot@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9EAA05E1998BB82001A872A /* about_dot@2x.png */; };
|
||||
A9F1E18619ACB63100B6A441 /* DTCoreTextTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A9F1E18519ACB63100B6A441 /* DTCoreTextTableViewCell.m */; };
|
||||
A9F1E18819ACB64D00B6A441 /* DTCoreTextTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9F1E18719ACB64D00B6A441 /* DTCoreTextTableViewCell.xib */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@@ -140,6 +146,9 @@
|
||||
A90BEC03199DDACA00230242 /* WYDInfoHeadView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WYDInfoHeadView.h; sourceTree = "<group>"; };
|
||||
A90BEC04199DDACA00230242 /* WYDInfoHeadView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WYDInfoHeadView.m; sourceTree = "<group>"; };
|
||||
A90BEC06199DDAFB00230242 /* WYDInfoHeadView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WYDInfoHeadView.xib; sourceTree = "<group>"; };
|
||||
A91C6D3D19AB8E9C00AEBF4D /* p2c_alert@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "p2c_alert@2x.png"; sourceTree = "<group>"; };
|
||||
A91C6D3E19AB8E9C00AEBF4D /* p2c_datesum@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "p2c_datesum@2x.png"; sourceTree = "<group>"; };
|
||||
A91C6D3F19AB8E9C00AEBF4D /* p2c_safeicon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "p2c_safeicon@2x.png"; sourceTree = "<group>"; };
|
||||
A9233E63199CA44700DA80D8 /* more_icon_5@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "more_icon_5@2x.png"; sourceTree = "<group>"; };
|
||||
A93F87721999AA8300875287 /* ManagerUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ManagerUtil.h; sourceTree = "<group>"; };
|
||||
A93F87731999AA8300875287 /* ManagerUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ManagerUtil.m; sourceTree = "<group>"; };
|
||||
@@ -271,6 +280,8 @@
|
||||
A9E76DD219AB378A00C0D232 /* hk_home_icon1@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "hk_home_icon1@2x.png"; sourceTree = "<group>"; };
|
||||
A9E76DD319AB378A00C0D232 /* hk_home_icon2@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "hk_home_icon2@2x.png"; sourceTree = "<group>"; };
|
||||
A9E76DD419AB378A00C0D232 /* hk_home_icon3@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "hk_home_icon3@2x.png"; sourceTree = "<group>"; };
|
||||
A9E8589B19AC2AAE001996DF /* DaiDaiTongApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DaiDaiTongApi.h; sourceTree = "<group>"; };
|
||||
A9E8589C19AC2AAE001996DF /* DaiDaiTongApi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DaiDaiTongApi.m; sourceTree = "<group>"; };
|
||||
A9EAA033199857F5001A872A /* HomeMainView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeMainView.h; sourceTree = "<group>"; };
|
||||
A9EAA034199857F5001A872A /* HomeMainView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeMainView.m; sourceTree = "<group>"; };
|
||||
A9EAA03F19985EDE001A872A /* HomeMainView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HomeMainView.xib; sourceTree = "<group>"; };
|
||||
@@ -286,6 +297,9 @@
|
||||
A9EAA05419988C55001A872A /* MRCircularProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRCircularProgressView.h; sourceTree = "<group>"; };
|
||||
A9EAA05519988C55001A872A /* MRCircularProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRCircularProgressView.m; sourceTree = "<group>"; };
|
||||
A9EAA05E1998BB82001A872A /* about_dot@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "about_dot@2x.png"; sourceTree = "<group>"; };
|
||||
A9F1E18419ACB63100B6A441 /* DTCoreTextTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DTCoreTextTableViewCell.h; sourceTree = "<group>"; };
|
||||
A9F1E18519ACB63100B6A441 /* DTCoreTextTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DTCoreTextTableViewCell.m; sourceTree = "<group>"; };
|
||||
A9F1E18719ACB64D00B6A441 /* DTCoreTextTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DTCoreTextTableViewCell.xib; sourceTree = "<group>"; };
|
||||
C7B3792862C24377B1ACD469 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@@ -524,6 +538,8 @@
|
||||
A9AF6C4A19949B510076C0EE /* Common */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A9F1E18319ACB24500B6A441 /* CustomCell */,
|
||||
A9E8589A19AC2940001996DF /* DaiDaiTongApi */,
|
||||
A96F2A79199D007700608237 /* UIButtonUtil */,
|
||||
A988A8F9199A50B600EB10AA /* UIViewShape */,
|
||||
A93F87C71999E4DA00875287 /* AttributedString */,
|
||||
@@ -541,6 +557,9 @@
|
||||
A9AF6C4D19949CAD0076C0EE /* Resource */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A91C6D3D19AB8E9C00AEBF4D /* p2c_alert@2x.png */,
|
||||
A91C6D3E19AB8E9C00AEBF4D /* p2c_datesum@2x.png */,
|
||||
A91C6D3F19AB8E9C00AEBF4D /* p2c_safeicon@2x.png */,
|
||||
A9E76DD219AB378A00C0D232 /* hk_home_icon1@2x.png */,
|
||||
A9E76DD319AB378A00C0D232 /* hk_home_icon2@2x.png */,
|
||||
A9E76DD419AB378A00C0D232 /* hk_home_icon3@2x.png */,
|
||||
@@ -641,6 +660,15 @@
|
||||
path = MyView;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A9E8589A19AC2940001996DF /* DaiDaiTongApi */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A9E8589B19AC2AAE001996DF /* DaiDaiTongApi.h */,
|
||||
A9E8589C19AC2AAE001996DF /* DaiDaiTongApi.m */,
|
||||
);
|
||||
path = DaiDaiTongApi;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A9EAA05319988C55001A872A /* MRCircularProgressView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -650,6 +678,16 @@
|
||||
path = MRCircularProgressView;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A9F1E18319ACB24500B6A441 /* CustomCell */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A9F1E18419ACB63100B6A441 /* DTCoreTextTableViewCell.h */,
|
||||
A9F1E18519ACB63100B6A441 /* DTCoreTextTableViewCell.m */,
|
||||
A9F1E18719ACB64D00B6A441 /* DTCoreTextTableViewCell.xib */,
|
||||
);
|
||||
path = CustomCell;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -741,6 +779,7 @@
|
||||
A9AF6C6919949CD30076C0EE /* icon_dock_session@2x.png in Resources */,
|
||||
A9AF6C5C19949CD30076C0EE /* icon_dock_forum_actived@2x.png in Resources */,
|
||||
A9AF6CA61994D0660076C0EE /* ad4@2x.png in Resources */,
|
||||
A9F1E18819ACB64D00B6A441 /* DTCoreTextTableViewCell.xib in Resources */,
|
||||
A9C69456199BD14D00B2CECE /* more_icon_8@2x.png in Resources */,
|
||||
A9AF6C48199498D10076C0EE /* MoreViewController.xib in Resources */,
|
||||
A9C69451199BD14D00B2CECE /* more_icon_2@2x.png in Resources */,
|
||||
@@ -748,6 +787,7 @@
|
||||
A9AF6C6119949CD30076C0EE /* icon_dock_mine@2x.png in Resources */,
|
||||
A9AF6CA51994D0660076C0EE /* ad3@2x.png in Resources */,
|
||||
A9EAA04819986DC3001A872A /* fund_cell_label_bg_red@2x.png in Resources */,
|
||||
A91C6D4219AB8E9C00AEBF4D /* p2c_safeicon@2x.png in Resources */,
|
||||
A9C6945A199BD16000B2CECE /* more_icon_1@2x.png in Resources */,
|
||||
A9EAA05F1998BB82001A872A /* about_dot@2x.png in Resources */,
|
||||
A9AF6C5E19949CD30076C0EE /* icon_dock_home_actived@2x.png in Resources */,
|
||||
@@ -766,6 +806,7 @@
|
||||
A9AF6C6519949CD30076C0EE /* icon_dock_service@2x.png in Resources */,
|
||||
A9AF6CA01994D0210076C0EE /* ad1@2x.png in Resources */,
|
||||
A93F87821999BB1D00875287 /* red_line_and_shadow@2x.png in Resources */,
|
||||
A91C6D4019AB8E9C00AEBF4D /* p2c_alert@2x.png in Resources */,
|
||||
A9AF6C6019949CD30076C0EE /* icon_dock_mine_actived@2x.png in Resources */,
|
||||
A9AF6C8F1994C5700076C0EE /* MJRefresh.bundle in Resources */,
|
||||
A9E76DD619AB378A00C0D232 /* hk_home_icon2@2x.png in Resources */,
|
||||
@@ -774,6 +815,7 @@
|
||||
A9AF6C791994B5890076C0EE /* tabbarShadowImage@2x.png in Resources */,
|
||||
A9E76DD519AB378A00C0D232 /* hk_home_icon1@2x.png in Resources */,
|
||||
A9C69453199BD14D00B2CECE /* more_icon_4@2x.png in Resources */,
|
||||
A91C6D4119AB8E9C00AEBF4D /* p2c_datesum@2x.png in Resources */,
|
||||
A9C69442199BB7B100B2CECE /* icon_person_take_image@2x.png in Resources */,
|
||||
A9C69457199BD14D00B2CECE /* more_icon_9@2x.png in Resources */,
|
||||
A90BEC07199DDAFB00230242 /* WYDInfoHeadView.xib in Resources */,
|
||||
@@ -859,6 +901,7 @@
|
||||
A9AF6C3D199486CA0076C0EE /* ProductListViewController.m in Sources */,
|
||||
A93F87741999AA8300875287 /* ManagerUtil.m in Sources */,
|
||||
A9AF6C941994C5700076C0EE /* UIScrollView+Extension.m in Sources */,
|
||||
A9E8589D19AC2AAE001996DF /* DaiDaiTongApi.m in Sources */,
|
||||
A96F2A7C199D008200608237 /* UIButton+Bootstrap.m in Sources */,
|
||||
A9AF6C47199498D10076C0EE /* MoreViewController.m in Sources */,
|
||||
A96F2A7F199D01C000608237 /* NSString+FontAwesome.m in Sources */,
|
||||
@@ -871,6 +914,7 @@
|
||||
A9AF6BFD19947DD00076C0EE /* AppDelegate.m in Sources */,
|
||||
A9AF6C911994C5700076C0EE /* MJRefreshConst.m in Sources */,
|
||||
A9AF6C931994C5700076C0EE /* MJRefreshHeaderView.m in Sources */,
|
||||
A9F1E18619ACB63100B6A441 /* DTCoreTextTableViewCell.m in Sources */,
|
||||
A9AF6BF919947DD00076C0EE /* main.m in Sources */,
|
||||
A90BEC05199DDACA00230242 /* WYDInfoHeadView.m in Sources */,
|
||||
A93F877C1999ACF600875287 /* MBProgressHUD+Util.m in Sources */,
|
||||
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// DTCoreTextTableViewCell.h
|
||||
// ManagerDemo
|
||||
//
|
||||
// Created by xmfish on 14-8-26.
|
||||
// Copyright (c) 2014年 ash. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface DTCoreTextTableViewCell : UITableViewCell
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// DTCoreTextTableViewCell.m
|
||||
// ManagerDemo
|
||||
//
|
||||
// Created by xmfish on 14-8-26.
|
||||
// Copyright (c) 2014年 ash. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DTCoreTextTableViewCell.h"
|
||||
|
||||
@implementation DTCoreTextTableViewCell
|
||||
|
||||
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
|
||||
{
|
||||
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||||
if (self) {
|
||||
// Initialization code
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
|
||||
{
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="WpS-b6-3xs" customClass="DTCoreTextTableViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WpS-b6-3xs" id="iwa-wO-awm">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// DaiDaiTongApi.h
|
||||
// ManagerDemo
|
||||
//
|
||||
// Created by xmfish on 14-8-26.
|
||||
// Copyright (c) 2014年 ash. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MKNetworkEngine.h"
|
||||
|
||||
@interface DaiDaiTongApi : MKNetworkEngine
|
||||
|
||||
typedef void (^CompletionBlock) (id jsonRes);
|
||||
typedef void (^FailedBlock) (NSError *error);
|
||||
|
||||
+(DaiDaiTongApi*)shareInstance;
|
||||
|
||||
/**
|
||||
* 获取首页广告
|
||||
*
|
||||
* @param completionBlock 请求完成
|
||||
* @param failedBlock 请求失败
|
||||
*
|
||||
* @return MKNetworkOperation
|
||||
*/
|
||||
-(MKNetworkOperation*)getBannerInfoWithcompletionBlock:(CompletionBlock) completionBlock failedBlock:(FailedBlock)failedBlock;
|
||||
|
||||
/**
|
||||
* 获取首页推荐
|
||||
*
|
||||
* @param completionBlock 请求完成
|
||||
* @param failedBlock 请求失败
|
||||
*
|
||||
* @return MKNetworkOperation
|
||||
*/
|
||||
-(MKNetworkOperation*)getFundRecommendWithcompletionBlock:(CompletionBlock)completionBlock failedBlock:(FailedBlock)failedBlock;
|
||||
@end
|
||||
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// DaiDaiTongApi.m
|
||||
// ManagerDemo
|
||||
//
|
||||
// Created by xmfish on 14-8-26.
|
||||
// Copyright (c) 2014年 ash. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DaiDaiTongApi.h"
|
||||
|
||||
@implementation DaiDaiTongApi
|
||||
|
||||
+(DaiDaiTongApi*)shareInstance
|
||||
{
|
||||
static DaiDaiTongApi* shareInstance = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
NSMutableDictionary *postHeaderFields = [NSMutableDictionary dictionary];
|
||||
[postHeaderFields setValue:@"application/json;charset=utf-8" forKey:@"Content-Type"];
|
||||
[postHeaderFields setValue:@"gzip,deflate" forKey:@"Accept-Encoding"];
|
||||
shareInstance = [[super alloc] initWithHostName:DaiDaiTong_API_URL customHeaderFields:postHeaderFields];
|
||||
});
|
||||
return shareInstance;
|
||||
}
|
||||
|
||||
-(MKNetworkOperation*)getWithPath:(NSString*)path params:(NSDictionary *)params
|
||||
{
|
||||
return [self operationWithPath:path params:params httpMethod:@"GET" ssl:YES];
|
||||
}
|
||||
-(MKNetworkOperation*)postWithPath:(NSString*)path params:(NSDictionary *)params
|
||||
{
|
||||
return [self operationWithPath:path params:params httpMethod:@"POST" ssl:YES];
|
||||
}
|
||||
-(MKNetworkOperation*)getBannerInfoWithcompletionBlock:(CompletionBlock)completionBlock failedBlock:(FailedBlock)failedBlock
|
||||
{
|
||||
MKNetworkOperation* op = [self postWithPath:@"bannerInfo.do" params:nil];
|
||||
|
||||
[op addCompletionHandler:^(MKNetworkOperation *completedOperation) {
|
||||
completionBlock(completedOperation.responseJSON);
|
||||
|
||||
} errorHandler:^(MKNetworkOperation *completedOperation, NSError *error) {
|
||||
DLog(@"%@", error);
|
||||
failedBlock(error);
|
||||
}];
|
||||
|
||||
[self enqueueOperation:op forceReload:YES];
|
||||
|
||||
return op;
|
||||
}
|
||||
|
||||
-(MKNetworkOperation*)getFundRecommendWithcompletionBlock:(CompletionBlock)completionBlock failedBlock:(FailedBlock)failedBlock
|
||||
{
|
||||
MKNetworkOperation* op = [self postWithPath:@"fundRecommend.do" params:nil];
|
||||
|
||||
[op addCompletionHandler:^(MKNetworkOperation *completedOperation) {
|
||||
completionBlock(completedOperation.responseJSON);
|
||||
|
||||
} errorHandler:^(MKNetworkOperation *completedOperation, NSError *error) {
|
||||
DLog(@"%@", error);
|
||||
failedBlock(error);
|
||||
}];
|
||||
|
||||
[self enqueueOperation:op forceReload:YES];
|
||||
|
||||
return op;
|
||||
}
|
||||
@end
|
||||
@@ -9,6 +9,12 @@
|
||||
#ifndef ManagerDemo_ManagerConstants_h
|
||||
#define ManagerDemo_ManagerConstants_h
|
||||
|
||||
|
||||
/**
|
||||
* 接口地址
|
||||
*/
|
||||
|
||||
#define DaiDaiTong_API_URL @"mobi.yingyinglicai.com:8443/front"
|
||||
/**
|
||||
* 系统版本
|
||||
*/
|
||||
|
||||
@@ -31,5 +31,5 @@
|
||||
|
||||
+(UIView*)selectBackgroudViewWithFrame:(CGRect)frame;
|
||||
|
||||
+ (UIImage *) buttonImageFromColor:(UIColor *)color withFrame:(CGRect)frame;
|
||||
+(UIImage*) buttonImageFromColor:(UIColor *)color withFrame:(CGRect)frame;
|
||||
@end
|
||||
|
||||
@@ -10,5 +10,7 @@
|
||||
#import "ImagePlayerView.h"
|
||||
@interface HomeAdView : UIView<UIScrollViewDelegate,ImagePlayerViewDelegate>
|
||||
{
|
||||
NSMutableArray* _bannerInfo;
|
||||
}
|
||||
@property(nonatomic,strong)NSMutableArray* bannerInfo;
|
||||
@end
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
//
|
||||
|
||||
#import "HomeAdView.h"
|
||||
#import <SDWebImage/UIImageView+WebCache.h>
|
||||
@implementation HomeAdView
|
||||
{
|
||||
NSArray *imageArray;
|
||||
ImagePlayerView* imagePlayerView;
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
@@ -18,34 +19,35 @@
|
||||
if (self) {
|
||||
// Initialization code
|
||||
}
|
||||
imageArray=@[[UIImage imageNamed:@"ad1"],[UIImage imageNamed:@"ad2"],[UIImage imageNamed:@"ad3"],[UIImage imageNamed:@"ad4"]];
|
||||
NSMutableArray* imageViewArray = [[NSMutableArray alloc] init];
|
||||
for (int i=0; i<imageArray.count; i++) {
|
||||
UIImageView *imageview=[[UIImageView alloc]init];
|
||||
imageview.image=[imageArray objectAtIndex:i];
|
||||
imageview.contentMode=UIViewContentModeScaleAspectFit;
|
||||
[imageViewArray addObject:imageview];
|
||||
}
|
||||
|
||||
ImagePlayerView* imagePlayerView = [[ImagePlayerView alloc] init];
|
||||
imagePlayerView = [[ImagePlayerView alloc] init];
|
||||
imagePlayerView.frame = frame;
|
||||
[imagePlayerView initWithCount:4 delegate:self];
|
||||
[self addSubview:imagePlayerView];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
// An empty implementation adversely affects performance during animation.
|
||||
- (void)drawRect:(CGRect)rect
|
||||
{
|
||||
// Drawing code
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
-(void)setBannerInfo:(NSMutableArray *)bannerInfo
|
||||
{
|
||||
_bannerInfo = bannerInfo;
|
||||
[imagePlayerView initWithCount:bannerInfo.count delegate:self];
|
||||
}
|
||||
#pragma mark ImagePlayerDelegate
|
||||
- (void)imagePlayerView:(ImagePlayerView *)imagePlayerView loadImageForImageView:(UIImageView *)imageView index:(NSInteger)index
|
||||
{
|
||||
[imageView setImage:[imageArray objectAtIndex:index]];
|
||||
[imageView sd_setImageWithURL:[[_bannerInfo objectAtIndex:index]objectForKey:@"url"] placeholderImage:[UIImage imageNamed:@"ad1"]];
|
||||
}
|
||||
- (void)imagePlayerView:(ImagePlayerView *)imagePlayerView didTapAtIndex:(NSInteger)index
|
||||
{
|
||||
DLog(@"%@",[_bannerInfo objectAtIndex:index]);
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -18,5 +18,15 @@
|
||||
@property (weak, nonatomic) IBOutlet DTAttributedLabel *timeLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *infoLabel;
|
||||
- (IBAction)sureBtnClick:(id)sender;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *securityDescLabel;
|
||||
|
||||
|
||||
-(void)setName:(NSString*)name;
|
||||
-(void)setpercent:(float)percent;
|
||||
-(void)setExpect:(float)expect;
|
||||
-(void)setType:(NSString*)type;
|
||||
-(void)setInfo:(NSString*)info;
|
||||
-(void)setSecurityDesc:(NSString*)securityDesc;
|
||||
-(void)setTime:(NSInteger)month withStartBuy:(NSInteger)money;
|
||||
|
||||
@end
|
||||
|
||||
@@ -32,33 +32,15 @@
|
||||
{
|
||||
// Drawing code
|
||||
|
||||
progressPercent = 0.33;
|
||||
progressPercent = 0.0;
|
||||
//进度条
|
||||
_percentView.delegate = self;
|
||||
_percentView.wrapperColor = [UIColor clearColor];
|
||||
_percentView.progressColor = [UIColor redColor];
|
||||
_percentView.progressArcWidth = 10.0f;
|
||||
[_percentView setProgress:progressPercent duration:1.0];
|
||||
//
|
||||
|
||||
//旋转
|
||||
_typeLabel.transform = CGAffineTransformMakeRotation( M_PI/4 );
|
||||
|
||||
//中间文字
|
||||
NSString* htmlStr = @"<span style=\"font-size:40px; color:red; text-align:center; \">9</span>%";
|
||||
NSData *data = [htmlStr dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSDictionary* optionsDic = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:kCTTextAlignmentCenter],DTDefaultTextAlignment, nil];
|
||||
NSAttributedString *percentString = [[NSAttributedString alloc] initWithHTMLData:data options:optionsDic documentAttributes:nil];
|
||||
_percentLabel.attributedString = percentString;
|
||||
//预期
|
||||
htmlStr = @"<span style=\"font-size:11px;text-align:center; \">四个大字<span style=\"font-size:13px; color:red;\">10.20%</span></span>";
|
||||
data = [htmlStr dataUsingEncoding:NSUTF8StringEncoding];
|
||||
percentString = [[NSAttributedString alloc] initWithHTMLData:data documentAttributes:NULL];
|
||||
_expectLabel.attributedString = percentString;
|
||||
|
||||
//时间
|
||||
htmlStr = [NSString stringWithFormat:@"<span style=\"font-size:11px;text-align:center; \">限<span style=\"font-size:13px; color:red;\">%d</span>个月<span style=\"font-size:13px; color:red;\">%d</span>起</span>",15,50];
|
||||
data = [htmlStr dataUsingEncoding:NSUTF8StringEncoding];
|
||||
percentString = [[NSAttributedString alloc] initWithHTMLData:data documentAttributes:NULL];
|
||||
_timeLabel.attributedString = percentString;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +59,49 @@
|
||||
DLog(@"确认");
|
||||
}
|
||||
|
||||
-(void)setName:(NSString *)name
|
||||
{
|
||||
[_nameLabel setText:name];
|
||||
}
|
||||
-(void)setpercent:(float)percent
|
||||
{
|
||||
progressPercent = percent;
|
||||
[_percentView setProgress:percent duration:1.0];
|
||||
//中间文字
|
||||
NSString* htmlStr = [NSString stringWithFormat:@"<span style=\"font-size:40px; color:red; text-align:center; \">%d</span>%%",(int)percent*100];
|
||||
NSData *data = [htmlStr dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSDictionary* optionsDic = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:kCTTextAlignmentCenter],DTDefaultTextAlignment, nil];
|
||||
NSAttributedString *percentString = [[NSAttributedString alloc] initWithHTMLData:data options:optionsDic documentAttributes:nil];
|
||||
_percentLabel.attributedString = percentString;
|
||||
}
|
||||
-(void)setExpect:(float)expect
|
||||
{
|
||||
//预期
|
||||
NSString* htmlStr = [NSString stringWithFormat:@"<span style=\"font-size:11px;text-align:center; \">四个大字<span style=\"font-size:13px; color:red;\">%.2f%%</span></span>",expect];
|
||||
NSData* data = [htmlStr dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSAttributedString* percentString = [[NSAttributedString alloc] initWithHTMLData:data documentAttributes:NULL];
|
||||
_expectLabel.attributedString = percentString;
|
||||
}
|
||||
-(void)setTime:(NSInteger)month withStartBuy:(NSInteger)money
|
||||
{
|
||||
//时间
|
||||
NSString* htmlStr = [NSString stringWithFormat:@"<span style=\"font-size:11px;text-align:center; \">限<span style=\"font-size:13px; color:red;\">%d</span>个月<span style=\"font-size:13px; color:red;\">%d</span>起</span>",month,money];
|
||||
NSData* data = [htmlStr dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSAttributedString* percentString = [[NSAttributedString alloc] initWithHTMLData:data documentAttributes:NULL];
|
||||
_timeLabel.attributedString = percentString;
|
||||
}
|
||||
-(void)setType:(NSString *)type
|
||||
{
|
||||
[_typeLabel setText:type];
|
||||
}
|
||||
-(void)setInfo:(NSString *)info
|
||||
{
|
||||
[_infoLabel setText:info];
|
||||
}
|
||||
-(void)setSecurityDesc:(NSString *)securityDesc
|
||||
{
|
||||
[_securityDescLabel setText:securityDesc];
|
||||
}
|
||||
#pragma mark - CABasicAnimationDelegate
|
||||
|
||||
- (void)animationDidStart:(CAAnimation *)theAnimation
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4514" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3746"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
@@ -30,7 +30,7 @@
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="bottom" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="点我你就会变超人" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="iR9-8X-qqa">
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="bottom" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="iR9-8X-qqa">
|
||||
<rect key="frame" x="3" y="-6" width="200" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="19"/>
|
||||
@@ -47,7 +47,7 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="42" placeholderIntrinsicHeight="21" text="新手" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="1tT-kO-DcP">
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="42" placeholderIntrinsicHeight="21" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="1tT-kO-DcP">
|
||||
<rect key="frame" x="0.0" y="9" width="42" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<rect key="contentStretch" x="1" y="1" width="1" height="1"/>
|
||||
@@ -71,21 +71,21 @@
|
||||
<view contentMode="scaleToFill" id="Igx-ly-iLf">
|
||||
<rect key="frame" x="141" y="181" width="1" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="额外送你20快钱" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="kkT-GU-Uxk">
|
||||
<rect key="frame" x="11" y="209" width="260" height="21"/>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="kkT-GU-Uxk">
|
||||
<rect key="frame" x="11" y="200" width="260" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="11"/>
|
||||
<color key="textColor" red="1" green="0.37822147690000002" blue="0.16647340829999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="b3g-Qg-i3k">
|
||||
<rect key="frame" x="0.0" y="231" width="280" height="44"/>
|
||||
<rect key="frame" x="0.0" y="238" width="280" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.79962531889999999" green="0.18166188729999999" blue="0.1209349611" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<state key="normal" title="点击">
|
||||
<state key="normal">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
@@ -102,6 +102,13 @@
|
||||
<action selector="percentBtnClick:" destination="7ik-6g-4aB" eventType="touchUpInside" id="su9-hl-na1"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="G0Z-tK-6d4">
|
||||
<rect key="frame" x="0.0" y="214" width="280" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="11"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<connections>
|
||||
@@ -110,6 +117,7 @@
|
||||
<outlet property="nameLabel" destination="iR9-8X-qqa" id="ket-0J-7Id"/>
|
||||
<outlet property="percentLabel" destination="bkz-1X-k90" id="Kto-ze-01o"/>
|
||||
<outlet property="percentView" destination="r0t-sm-d8w" id="ncm-g1-PfS"/>
|
||||
<outlet property="securityDescLabel" destination="G0Z-tK-6d4" id="xll-sb-7fY"/>
|
||||
<outlet property="timeLabel" destination="yOO-QQ-AEi" id="hJv-z0-5nv"/>
|
||||
<outlet property="typeLabel" destination="1tT-kO-DcP" id="CMf-iF-RqM"/>
|
||||
</connections>
|
||||
@@ -119,4 +127,4 @@
|
||||
<image name="fund_cell_label_bg_blue.png" width="38" height="40"/>
|
||||
<image name="pie_chart_center.png" width="117" height="117"/>
|
||||
</resources>
|
||||
</document>
|
||||
</document>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
- (void)drawRect:(CGRect)rect
|
||||
{
|
||||
// Drawing code
|
||||
_progressView.transform = CGAffineTransformMakeScale(1.0f,5.0f);
|
||||
_progressView.transform = CGAffineTransformMakeScale(1.0f,8.0f);
|
||||
_hasPercent.backgroundColor = [UIColor clearColor];
|
||||
_leftMoney.backgroundColor = [UIColor clearColor];
|
||||
[self setProgress:0.336];
|
||||
|
||||
@@ -11,99 +11,125 @@
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="融资金额(元)" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="fss-Hz-CuD">
|
||||
<rect key="frame" x="119" y="11" width="82" height="21"/>
|
||||
<rect key="frame" x="119" y="20" width="82" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.70531728319999998" green="0.70531728319999998" blue="0.70531728319999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="62,000.00" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="yCh-FU-y40">
|
||||
<rect key="frame" x="0.0" y="32" width="320" height="21"/>
|
||||
<rect key="frame" x="0.0" y="41" width="320" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="20"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="24"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" id="fuY-SE-r31">
|
||||
<rect key="frame" x="20" y="61" width="280" height="2"/>
|
||||
<rect key="frame" x="20" y="79" width="280" height="2"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="progressTintColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="trackTintColor" red="0.90999681119999998" green="0.90999681119999998" blue="0.90999681119999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</progressView>
|
||||
<view contentMode="scaleToFill" id="vfm-xl-jIE" customClass="DTAttributedLabel">
|
||||
<rect key="frame" x="20" y="71" width="117" height="17"/>
|
||||
<rect key="frame" x="20" y="94" width="117" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" id="gD8-R5-ouO" customClass="DTAttributedLabel">
|
||||
<rect key="frame" x="174" y="71" width="126" height="17"/>
|
||||
<rect key="frame" x="174" y="94" width="126" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" id="iOf-F3-3DN">
|
||||
<rect key="frame" x="160" y="95" width="1" height="30"/>
|
||||
<rect key="frame" x="160" y="104" width="1" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="预期年化" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="EE7-dl-zzc">
|
||||
<rect key="frame" x="20" y="87" width="141" height="21"/>
|
||||
<rect key="frame" x="20" y="114" width="141" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="起投金额(元)" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="aEi-rU-7vj">
|
||||
<rect key="frame" x="160" y="87" width="140" height="21"/>
|
||||
<rect key="frame" x="160" y="114" width="140" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0.00%" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="RF7-IF-cuT">
|
||||
<rect key="frame" x="20" y="110" width="141" height="21"/>
|
||||
<rect key="frame" x="20" y="134" width="141" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="20"/>
|
||||
<color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="100" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="vln-TR-h3K">
|
||||
<rect key="frame" x="160" y="110" width="140" height="21"/>
|
||||
<rect key="frame" x="160" y="134" width="140" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="20"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="hk_home_icon1.png" id="1M5-O7-AI9">
|
||||
<rect key="frame" x="20" y="139" width="15" height="15"/>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="p2c_alert.png" id="1M5-O7-AI9">
|
||||
<rect key="frame" x="20" y="164" width="15" height="15"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="hk_home_icon1.png" id="jGQ-3j-fdo">
|
||||
<rect key="frame" x="110" y="139" width="15" height="15"/>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="p2c_safeicon.png" id="jGQ-3j-fdo">
|
||||
<rect key="frame" x="110" y="164" width="15" height="15"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="hk_home_icon1.png" id="EYE-Mu-6AG">
|
||||
<rect key="frame" x="220" y="139" width="15" height="15"/>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="p2c_datesum.png" id="EYE-Mu-6AG">
|
||||
<rect key="frame" x="220" y="164" width="15" height="15"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="高收益" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="1bV-FM-qrH">
|
||||
<rect key="frame" x="38" y="136" width="42" height="21"/>
|
||||
<rect key="frame" x="38" y="162" width="42" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="11"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="第三方本息担保" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="wb7-cz-cnP">
|
||||
<rect key="frame" x="128" y="136" width="83" height="21"/>
|
||||
<rect key="frame" x="128" y="162" width="83" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="11"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="限12个月" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="jqp-AZ-0gM">
|
||||
<rect key="frame" x="238" y="136" width="83" height="21"/>
|
||||
<rect key="frame" x="238" y="162" width="83" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="11"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="起息日: 募集成功次日计算收益" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="esU-Zb-has">
|
||||
<rect key="frame" x="20" y="191" width="280" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="还款提示: 按月等额本息还至账户余额" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="iQ3-1B-JLD">
|
||||
<rect key="frame" x="20" y="209" width="280" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="hk_home_icon2.png" id="3pK-xj-f99">
|
||||
<rect key="frame" x="20" y="234" width="15" height="15"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="账户资金安全由中信银行监管" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="hkG-19-1qV">
|
||||
<rect key="frame" x="43" y="231" width="257" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
@@ -115,6 +141,9 @@
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="hk_home_icon1.png" width="30" height="30"/>
|
||||
<image name="hk_home_icon2.png" width="30" height="30"/>
|
||||
<image name="p2c_alert.png" width="18" height="17"/>
|
||||
<image name="p2c_datesum.png" width="18" height="17"/>
|
||||
<image name="p2c_safeicon.png" width="18" height="17"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
NSArray *nib=[[NSBundle mainBundle]loadNibNamed:@"WYDInfoHeadView" owner:self options:nil];
|
||||
|
||||
|
||||
WYDInfoHeadView* wydInfoHedaView = (WYDInfoHeadView*)[nib objectAtIndex:0];
|
||||
_tableView.tableHeaderView = wydInfoHedaView;
|
||||
}
|
||||
@@ -40,7 +38,7 @@
|
||||
#pragma mark UITableViewDelegate
|
||||
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
{
|
||||
return 5;
|
||||
return 4;
|
||||
}
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
@@ -49,16 +47,103 @@
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
if (indexPath.section == 0) {
|
||||
return 60;
|
||||
return 40;
|
||||
}
|
||||
return 60;
|
||||
switch (indexPath.section) {
|
||||
case 0:
|
||||
return 40;
|
||||
break;
|
||||
case 1:
|
||||
return 80;
|
||||
break;
|
||||
case 2:
|
||||
return 40;
|
||||
break;
|
||||
case 3:
|
||||
return 40;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
UITableViewCell* cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
|
||||
cell.textLabel.text = @"我是一个好人";
|
||||
NSString* cellIDentifier = [NSString stringWithFormat:@"CellIDentifier%d-%d",indexPath.section,indexPath.row];
|
||||
DTAttributedTextCell* cell = [tableView dequeueReusableCellWithIdentifier:cellIDentifier];
|
||||
if (!cell) {
|
||||
cell = [[DTAttributedTextCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIDentifier];
|
||||
|
||||
}
|
||||
switch (indexPath.section) {
|
||||
case 0:
|
||||
{
|
||||
cell.textLabel.font = [UIFont systemFontOfSize:12.0];
|
||||
cell.textLabel.text = @"已投标人数:";
|
||||
cell.detailTextLabel.font = [UIFont systemFontOfSize:12.0];
|
||||
cell.detailTextLabel.text = @"255人";
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
[cell setHTMLString:@"活动期间,新手首次申购,买50元及以上送20元现金红包。<br>注:新手特指从未申购过稳盈贷产品的用户;每个新手只享受一次20元现金红包奖励;红包奖励将在募集成功后下一个工作日发放到账户余额。"];
|
||||
cell.attributedTextContextView.edgeInsets = UIEdgeInsetsMake(5, 15, 5, 15);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
[cell setHTMLString:@"上海**金属制品有限公司法定代表人为资金周转,以个人名义申请借款。"];
|
||||
cell.attributedTextContextView.edgeInsets = UIEdgeInsetsMake(5, 15, 5, 15);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
[cell setHTMLString:@"浙江巨业担保有限公司全额本息保证"];
|
||||
cell.attributedTextContextView.edgeInsets = UIEdgeInsetsMake(15, 15, 5, 15);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return cell;
|
||||
|
||||
}
|
||||
-(UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
UIView* view = [ManagerUtil lineWithColor:Touch_BackGroudColor withAlpha:1.0 withFrame:CGRectMake(0, 0, 320, 30)];
|
||||
UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, view.frame.size.width-10, view.frame.size.height)];
|
||||
label.font = [UIFont systemFontOfSize:13];
|
||||
switch (section) {
|
||||
case 0:
|
||||
label.text = @"投标情况";
|
||||
break;
|
||||
case 1:
|
||||
label.text = @"申购奖励";
|
||||
break;
|
||||
case 2:
|
||||
label.text = @"项目描述";
|
||||
break;
|
||||
case 3:
|
||||
label.text = @"资金保障";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
[view addSubview:label];
|
||||
return view;
|
||||
}
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
return 30.0;
|
||||
}
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
|
||||
{
|
||||
return 1.0;
|
||||
}
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
|
||||
}
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4514" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3746"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WYDProductViewController">
|
||||
@@ -16,14 +16,40 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="rA7-5n-YqE">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="524"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<color key="sectionIndexBackgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</tableView>
|
||||
<view contentMode="scaleToFill" id="n8M-Tb-ssV">
|
||||
<rect key="frame" x="0.0" y="524" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" id="DI1-fp-5jk">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="1"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="0HP-LV-HVj">
|
||||
<rect key="frame" x="20" y="0.0" width="80" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="AQB-DV-9eI">
|
||||
<rect key="frame" x="194" y="7" width="119" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.94664779970000001" green="0.21506300749999999" blue="0.1431705727" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
|
||||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
</document>
|
||||
|
||||
@@ -11,7 +11,10 @@
|
||||
#import "HomeAdView.h"
|
||||
#import "HomeMainView.h"
|
||||
@interface HomeViewController ()
|
||||
|
||||
{
|
||||
HomeAdView* homeAdView;
|
||||
HomeMainView* homeMainView;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation HomeViewController
|
||||
@@ -44,21 +47,36 @@
|
||||
// [_tableView addFooterWithTarget:self action:@selector(footerRereshing)];
|
||||
|
||||
[_tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
|
||||
[_tableView headerBeginRefreshing];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark MJRefreshDelegate
|
||||
- (void)headerRereshing
|
||||
{
|
||||
|
||||
// 2.2秒后刷新表格UI
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
// 刷新表格
|
||||
DaiDaiTongApi* daiDaiTongApi = [DaiDaiTongApi shareInstance];
|
||||
//广告条
|
||||
[daiDaiTongApi getBannerInfoWithcompletionBlock:^(id jsonRes) {
|
||||
if ([[jsonRes objectForKey:@"succ"] integerValue] == 1) {
|
||||
NSMutableArray* bannerInfo = [jsonRes objectForKey:@"infos"];
|
||||
[homeAdView setBannerInfo:bannerInfo];
|
||||
}
|
||||
} failedBlock:^(NSError *error) {
|
||||
DLog(@"失败");
|
||||
[MBProgressHUD errorHudWithView:nil label:@"网络出错" hidesAfter:1.0];
|
||||
}];
|
||||
[daiDaiTongApi getFundRecommendWithcompletionBlock:^(id jsonRes) {
|
||||
if ([[jsonRes objectForKey:@"succ"] integerValue] != 1) {
|
||||
[MBProgressHUD errorHudWithView:nil label:[jsonRes objectForKey:@"err_msg"] hidesAfter:1.0];
|
||||
}else{
|
||||
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
|
||||
// (最好在刷新表格后调用)调用endRefreshing可以结束刷新状态
|
||||
[self.tableView headerEndRefreshing];
|
||||
});
|
||||
} failedBlock:^(NSError *error) {
|
||||
DLog(@"失败");
|
||||
[MBProgressHUD errorHudWithView:nil label:@"网络出错" hidesAfter:1.0];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)footerRereshing
|
||||
@@ -98,28 +116,34 @@
|
||||
}
|
||||
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
UITableViewCell* cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
|
||||
NSString* cellIdentifier = [NSString stringWithFormat:@"cell%d",indexPath.row];
|
||||
UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
|
||||
|
||||
|
||||
if (!cell) {
|
||||
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
|
||||
switch (indexPath.row) {
|
||||
case 0:{
|
||||
homeAdView = [[HomeAdView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, 140)];
|
||||
[cell addSubview:homeAdView];
|
||||
}
|
||||
break;
|
||||
case 1:{
|
||||
NSArray *nib=[[NSBundle mainBundle]loadNibNamed:@"HomeMainView" owner:self options:nil];
|
||||
|
||||
homeMainView = (HomeMainView*)[nib objectAtIndex:0];
|
||||
CGRect frame = homeMainView.frame;
|
||||
frame.origin.x = 20;
|
||||
homeMainView.frame = frame;
|
||||
[cell addSubview:homeMainView];
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
switch (indexPath.row) {
|
||||
case 0:{
|
||||
HomeAdView* homeAdView = [[HomeAdView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, 140)];
|
||||
[cell addSubview:homeAdView];
|
||||
}
|
||||
break;
|
||||
case 1:{
|
||||
NSArray *nib=[[NSBundle mainBundle]loadNibNamed:@"HomeMainView" owner:self options:nil];
|
||||
|
||||
HomeMainView* homeMainView = (HomeMainView*)[nib objectAtIndex:0];
|
||||
CGRect frame = homeMainView.frame;
|
||||
frame.origin.x = 20;
|
||||
homeMainView.frame = frame;
|
||||
[cell addSubview:homeMainView];
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return cell;
|
||||
}
|
||||
#pragma mark - UIBarButtonClick 导航条两边按钮
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4514" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3746"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="HomeViewController">
|
||||
@@ -26,4 +26,4 @@
|
||||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
</document>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
- (void)slideSwitchView:(QCSlideSwitchView *)view didselectTab:(NSUInteger)number
|
||||
{
|
||||
DLog(@"%ld",number);
|
||||
DLog(@"%d",number);
|
||||
_nowSelectTab = number;
|
||||
//进行第一次刷新
|
||||
[(ListViewController*)[listViewContrllerArray objectAtIndex:number] firstRefresh];
|
||||
|
||||
@@ -20,4 +20,7 @@
|
||||
#import "MBProgressHUD.h"
|
||||
#import "ManagerUtil.h"
|
||||
#import "MBProgressHUD+Util.h"
|
||||
#import "DaiDaiTongApi.h"
|
||||
#import <SDWebImage/UIImageView+WebCache.h>
|
||||
#import<SDWebImage/SDImageCache.h>
|
||||
#endif
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Reference in New Issue
Block a user