Commit c5d6da09 by lee

Mt pusherge branch 'master' of git.oschina.net:kollway-kollway/newcemarose

parents b12ef85b 68c2876c
......@@ -6,6 +6,7 @@
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
......@@ -24,7 +25,7 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nBP-0Q-eKB" userLabel="推荐搭配title view">
<rect key="frame" x="0.0" y="0.0" width="375" height="190"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="test_suit" translatesAutoresizingMaskIntoConstraints="NO" id="Xzr-zM-E25">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Xzr-zM-E25">
<rect key="frame" x="0.0" y="0.0" width="375" height="190"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_triangle" translatesAutoresizingMaskIntoConstraints="NO" id="LvJ-FP-Yc1">
......@@ -40,7 +41,7 @@
<constraint firstItem="Xzr-zM-E25" firstAttribute="top" secondItem="nBP-0Q-eKB" secondAttribute="top" id="4oD-P2-9Xz"/>
<constraint firstItem="Xzr-zM-E25" firstAttribute="leading" secondItem="nBP-0Q-eKB" secondAttribute="leading" id="Fci-xu-TIa"/>
<constraint firstAttribute="bottom" secondItem="LvJ-FP-Yc1" secondAttribute="bottom" constant="-1" id="SAq-Iw-I6t"/>
<constraint firstAttribute="height" constant="190" id="Ssh-cP-PRt"/>
<constraint firstAttribute="width" secondItem="nBP-0Q-eKB" secondAttribute="height" multiplier="375:190" id="Tke-yY-EUY"/>
<constraint firstAttribute="bottom" secondItem="Xzr-zM-E25" secondAttribute="bottom" id="UhQ-tF-lG6"/>
<constraint firstAttribute="trailing" secondItem="Xzr-zM-E25" secondAttribute="trailing" id="dj0-cH-YiI"/>
<constraint firstItem="LvJ-FP-Yc1" firstAttribute="centerX" secondItem="nBP-0Q-eKB" secondAttribute="centerX" id="yqu-ba-mQR"/>
......@@ -86,6 +87,5 @@
</objects>
<resources>
<image name="ic_triangle" width="21" height="11"/>
<image name="test_suit" width="375" height="212"/>
</resources>
</document>
......@@ -63,7 +63,10 @@ typedef enum{
@end
@implementation KWMNewHomeVC
@implementation KWMNewHomeVC{
CGFloat heightAdHeader;
CGFloat heightClothingSets;
}
- (void)viewDidLoad {
[super viewDidLoad];
......@@ -104,10 +107,12 @@ typedef enum{
- (void)initView{
// self.title = @"首页";
self.adHeader = [[KWMAdHeader alloc]initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, 275)];
heightAdHeader = UI_SCREEN_WIDTH * 275 / 375;
heightClothingSets = UI_SCREEN_WIDTH * 190 / 375 + 127; //127为图片外的布局高度
self.adHeader = [[KWMAdHeader alloc]initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, heightAdHeader)];
self.menuHeader = [[KWMMenuHeader alloc]initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, 100)];
self.recommendHeader = [[KWMRecommendHeader alloc]initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, 230)];
self.clothingSetsHeader = [[KWMClothingSetsHeader alloc]initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, 317)];
self.clothingSetsHeader = [[KWMClothingSetsHeader alloc]initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, heightClothingSets)];
self.hotSalesHeader = [[KWMHotSalesHeader alloc]initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, 250)];
self.adHeader.delegate = self;
......@@ -264,7 +269,7 @@ typedef enum{
NSInteger height = 0;
switch (section) {
case HeaderAd:
height = 275;
height = heightAdHeader;
break;
case HeaderMenu:
height = 100;
......@@ -273,7 +278,7 @@ typedef enum{
height = 230;
break;
case HeaderClothingSets:
height = 317;
height = heightClothingSets;
break;
case HeaderHotSales:
height = self.hotSalesHeader.actrualHeight;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment