Commit ed13299c authored by Sandy's avatar Sandy

bug fix

parent d52d86df
......@@ -9,6 +9,7 @@
#import <UIKit/UIKit.h>
#import "CommotityListModel.h"
@interface CommodityTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIImageView *imgView;
- (void)cellWithModel:(CommotityListModel *)model;
@end
......@@ -48,7 +48,7 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥9.8" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eSJ-Pe-NgQ">
<rect key="frame" x="218" y="69" width="50" height="24"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.60138541670000001" green="0.60138541670000001" blue="0.60138541670000001" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="销量:19" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WH8-2u-i8A">
......@@ -86,6 +86,7 @@
<color key="tintColor" red="0.48627450980392156" green="0.76470588235294112" blue="0.14509803921568626" alpha="1" colorSpace="calibratedRGB"/>
<inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
<connections>
<outlet property="imgView" destination="f2b-xv-2mY" id="Mcy-VO-86s"/>
<outlet property="imgViewCommodity" destination="f2b-xv-2mY" id="FGQ-WA-scQ"/>
<outlet property="labelBrokerageRate" destination="eSJ-Pe-NgQ" id="pic-rX-Z9U"/>
<outlet property="labelPrice" destination="exC-Ji-hHu" id="KTN-qN-5Vb"/>
......
......@@ -196,7 +196,7 @@
- (void)setUpCollectionView {
UICollectionViewFlowLayout *layOut = [[UICollectionViewFlowLayout alloc] init];
layOut.minimumLineSpacing = 10;
layOut.itemSize = CGSizeMake((ScreenSize.width - 30)/2, ScreenSize.height / 2.2);
layOut.itemSize = CGSizeMake((ScreenSize.width - 30)/2, 340);
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layOut];
[self.view addSubview:_collectionView];
......
......@@ -52,6 +52,7 @@
UIColor *color = self.navigationController.navigationBar.barTintColor;
[titleView setBackgroundColor:color];
UISearchBar *searchBar = [[UISearchBar alloc] init];
searchBar.delegate = self;
searchBar.frame = CGRectMake(0, 0, 260, 35);
searchBar.centerX = titleView.centerX;
......
......@@ -14,7 +14,7 @@
#import "CommodityListModel/CommotityListModel.h"
#import "ManagementViewController.h"
#import "Conditions.h"
#import "CommodityDetailViewController.h"
#import "JavenSortView.h"
#define kCellID @"commodityCell"
#define kPageSize @999
......@@ -56,7 +56,7 @@
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
// [self resetReloadData];
[self resetReloadData];
}
- (void)setUpSearchBar {
......@@ -282,9 +282,16 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
CommodityDetailViewController *detailVC = [[CommodityDetailViewController alloc] init];
detailVC.model = self.arrItemDatas[indexPath.row];
CommodityTableViewCell *cell = (CommodityTableViewCell *)[tableView cellForRowAtIndexPath:indexPath];
detailVC.image = cell.imgView.image;
[self.navigationController pushViewController:detailVC animated:YES];
}
#pragma mark =========== searchBar Delegate ===========
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
......
......@@ -10,7 +10,7 @@
@implementation MBFontAdapter
+(UIFont *)adjustFont:(UIFont *)font{
+ (UIFont *)adjustFont:(UIFont *)font{
UIFont *newFont=nil;
if (IS_IPHONE_6){
newFont = [UIFont fontWithName:font.fontName size:font.pointSize+IPHONE6_INCREMENT];
......
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