Jason Lee %!s(int64=10) %!d(string=hai) anos
pai
achega
c3dd6957ad

+ 13 - 9
kneet2/Base.lproj/HomeMember.storyboard

@@ -124,7 +124,7 @@
                                             <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
                                         </collectionViewFlowLayout>
                                         <cells>
-                                            <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="CollectionCellIdentifier" id="Y48-UA-qPE">
+                                            <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="CollectionCellIdentifier" id="Y48-UA-qPE" customClass="HomeMemberCollectionCell">
                                                 <rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
                                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                 <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
@@ -134,34 +134,31 @@
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="457-Hm-o4g" userLabel="View - Container">
                                                             <rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
                                                             <subviews>
-                                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="oC4-o4-zpd">
+                                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="100" placeholderIntrinsicHeight="100" translatesAutoresizingMaskIntoConstraints="NO" id="oC4-o4-zpd" customClass="CustomImageView">
                                                                     <rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
                                                                     <animations/>
                                                                     <constraints>
-                                                                        <constraint firstAttribute="height" constant="100" id="elK-JF-aKb"/>
                                                                         <constraint firstAttribute="width" constant="100" id="fnR-h1-KKP"/>
                                                                     </constraints>
                                                                     <variation key="default">
                                                                         <mask key="constraints">
-                                                                            <exclude reference="elK-JF-aKb"/>
                                                                             <exclude reference="fnR-h1-KKP"/>
                                                                         </mask>
                                                                     </variation>
                                                                     <variation key="heightClass=regular-widthClass=compact">
                                                                         <mask key="constraints">
-                                                                            <include reference="elK-JF-aKb"/>
                                                                             <include reference="fnR-h1-KKP"/>
                                                                         </mask>
                                                                     </variation>
                                                                 </imageView>
-                                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sRI-jF-TYZ">
+                                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sRI-jF-TYZ" customClass="CustomLabel">
                                                                     <rect key="frame" x="-42" y="-21" width="42" height="21"/>
                                                                     <animations/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
                                                                     <nil key="highlightedColor"/>
                                                                 </label>
-                                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="160" placeholderIntrinsicHeight="21" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7q2-vA-IXJ">
+                                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="160" placeholderIntrinsicHeight="21" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7q2-vA-IXJ" customClass="CustomLabel">
                                                                     <rect key="frame" x="-42" y="-21" width="42" height="21"/>
                                                                     <animations/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
@@ -252,6 +249,11 @@
                                                         <include reference="m8l-N2-YvC"/>
                                                     </mask>
                                                 </variation>
+                                                <connections>
+                                                    <outlet property="imgvMemberIcon" destination="oC4-o4-zpd" id="uHQ-qO-irL"/>
+                                                    <outlet property="lblNickname" destination="sRI-jF-TYZ" id="bL6-n2-te5"/>
+                                                    <outlet property="lblStatus" destination="7q2-vA-IXJ" id="84e-09-MUx"/>
+                                                </connections>
                                             </collectionViewCell>
                                         </cells>
                                         <collectionReusableView key="sectionFooterView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="mTP-FO-CV5">
@@ -261,7 +263,6 @@
                                     </collectionView>
                                 </subviews>
                                 <animations/>
-                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
                                 <constraints>
                                     <constraint firstAttribute="trailing" secondItem="l0a-wm-olW" secondAttribute="trailing" id="Db1-FS-mYm"/>
                                     <constraint firstAttribute="bottom" secondItem="1BG-fl-tMC" secondAttribute="bottom" constant="70" id="O5p-VA-klX"/>
@@ -304,7 +305,7 @@
                             </view>
                         </subviews>
                         <animations/>
-                        <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <constraints>
                             <constraint firstItem="cgw-Um-cGw" firstAttribute="top" secondItem="FRX-jq-RY9" secondAttribute="bottom" constant="-20" id="3gE-oH-Ndo"/>
                             <constraint firstItem="uin-sv-GXR" firstAttribute="top" secondItem="cgw-Um-cGw" secondAttribute="bottom" id="Rbk-2o-wXs"/>
@@ -313,6 +314,9 @@
                         </constraints>
                     </view>
                     <simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
+                    <connections>
+                        <outlet property="collectionView" destination="1BG-fl-tMC" id="fqb-pb-riZ"/>
+                    </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="36W-bX-YKt" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>

+ 1 - 1
kneet2/Classes/ViewControllers/HomeMemberScreens/HomeMemberDetailViewController.m

@@ -105,7 +105,7 @@
         HomeMemberViewController *vc = [[JDFacade facade] viewControllerOnNaviationController:[HomeMemberViewController class]];
         if (vc) {
             if ([updateType isEqualToString:@"grade"]) {
-                [vc.tableView reloadData];
+//                [vc.tableView reloadData];
             } else {
                 if ([updateType isEqualToString:@"ban"]) {
                     [[JDFacade facade] toast:NSLocalizedString(@"멤버가 삭제되었습니다", @"멤버가 삭제되었습니다")];

+ 8 - 22
kneet2/Classes/ViewControllers/HomeMemberScreens/HomeMemberViewController.h

@@ -12,8 +12,7 @@
 
 
 #pragma mark - Properties
-@property (weak, nonatomic) IBOutlet UITableView *tableView;
-
+@property (weak, nonatomic) IBOutlet UICollectionView *collectionView;
 
 #pragma mark - Instance Methods
 - (void)refreshHomeMemberList;
@@ -25,28 +24,15 @@
 @class CustomLabel;
 @class CustomImageView;
 
-@interface MemberHeaderTableViewCell : UITableViewCell
-
-@property (weak, nonatomic) IBOutlet CustomButton *btnHeader;
-@property (assign, nonatomic) NSInteger section;
-@property (weak, nonatomic) NSMutableDictionary *group;
-
-- (IBAction)btnHeaderTouched:(id)sender;
-
-@end
-
-@interface MemberTableViewCell : UITableViewCell
+@interface HomeMemberCollectionCell : UICollectionViewCell
 
-@property (weak, nonatomic) IBOutlet CustomButton *btnMemberIcon;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblTitle;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblLevel;
+@property (weak, nonatomic) IBOutlet CustomImageView *imgvMemberIcon;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblNickname;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblStatus;
 
 @end
 
+@interface HomeMemberCollectionFooterView : UICollectionReusableView
+@property (weak, nonatomic) IBOutlet UILabel *lblHeaderTitle;
 
-@interface MemberAddTableViewCell : UITableViewCell
-@property (weak, nonatomic) IBOutlet CustomLabel *lblAddTitle;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblAddDesc;
-
-- (IBAction)btnAddTouched:(id)sender;
-@end
+@end

+ 73 - 253
kneet2/Classes/ViewControllers/HomeMemberScreens/HomeMemberViewController.m

@@ -6,72 +6,45 @@
 //  Copyright (c) 2015 ntels. All rights reserved.
 //
 
-#import "HomeMemberViewController.h"
-#import "CustomButton.h"
-#import "LoginModel.h"
 #import "RequestHandler.h"
+#import "LoginModel.h"
+
+#import "CustomButton.h"
 #import "CustomLabel.h"
-#import "UIButton+WebCache.h"
-#import "HomeMemberDetailViewController.h"
 
-#define kfMemberTableViewCellHeight 100.0f
+#import "UIImageView+WebCache.h"
 
-@protocol MembersHeaderTableViewCellDelegate <NSObject>
-@optional
-- (void)didMemberHeaderTableViewCellBtnHeaderTouched:(id)sender;
+#import "HomeMemberDetailViewController.h"
+#import "HomeMemberViewController.h"
+#import "CustomImageView.h"
 
-@end
+#define kfMemberTableViewCellHeight 100.0f
 
-@interface MemberHeaderTableViewCell () {
+@interface HomeMemberCollectionCell () {
+    
 }
 
-@property (assign, nonatomic) id <MembersHeaderTableViewCellDelegate> delegate;
-@end
-
-@implementation MemberHeaderTableViewCell
-
-- (IBAction)btnHeaderTouched:(id)sender {
-    [_btnHeader faceOffImage];
-    _group[@"unfold"] = @(![_group[@"unfold"] boolValue]);
-
-    if ([self.delegate respondsToSelector:@selector(didMemberHeaderTableViewCellBtnHeaderTouched:)]) {
-        [self.delegate didMemberHeaderTableViewCellBtnHeaderTouched:self];
-    }
-}
+@property (weak, nonatomic) NSIndexPath *indexPath;
 
 @end
 
-@implementation MemberTableViewCell
 
-- (void)awakeFromNib {
-    self.backgroundColor = [UIColor clearColor];
-    self.selectionStyle = UITableViewCellSelectionStyleNone;
-    self.opaque = NO;
-}
+@implementation HomeMemberCollectionCell
 
 @end
 
-@implementation MemberAddTableViewCell
+@implementation HomeMemberCollectionFooterView
 
 - (void)awakeFromNib {
-    self.backgroundColor = [UIColor clearColor];
-    self.selectionStyle = UITableViewCellSelectionStyleNone;
-    
-    _lblAddTitle.text = NSLocalizedString(@"주변 사람들을 초대하세요!", @"주변 사람들을 초대하세요!");
-    _lblAddDesc.text = NSLocalizedString(@"멤버가 되면 내장치를 같이 쓸 수 있어요\n편리한 자동 규칙도 함께 만들어보세요", @"멤버가 되면 내장치를 같이 쓸 수 있어요\n편리한 자동 규칙도 함께 만들어보세요");
-}
 
-- (void)btnAddTouched:(id)sender {
-    UIViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"HomeMemberAddViewController" storyboardName:@"HomeMember"];
-    [[JDFacade facade].currentViewController.navigationController pushViewController:vc animated:YES];
 }
 
 @end
 
-@interface HomeMemberViewController () <UITableViewDataSource, UITableViewDelegate, MembersHeaderTableViewCellDelegate> {
+
+@interface HomeMemberViewController () <UICollectionViewDelegate, UICollectionViewDataSource> {
     NSMutableArray *_groups;
-    UIImage *_bgCellImage1, *_bgCellImage2;
-    NSMutableArray *_arrayForHeader;
+    NSArray<HomeMemberModel> *_memberList;
 }
 @end
 
@@ -97,19 +70,10 @@
 - (void)initUI {
 
     //set tableview option
-    _tableView.delegate = self;
-    _tableView.dataSource = self;
-
-    _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
-    _tableView.backgroundColor = [UIColor clearColor];
-
-    _tableView.tableFooterView = [[UIView alloc] init]; //this call table events;
-
-
-    UIEdgeInsets insets = UIEdgeInsetsMake(4, 4, 4, 4);
-    _bgCellImage1 = [CommonUtil resizableImageWithCapInsets:insets resizingMode:UIImageResizingModeStretch img:[UIImage imageNamed:@"tp_01_img_list_bg_02"]];
-    _bgCellImage2 = [CommonUtil resizableImageWithCapInsets:insets resizingMode:UIImageResizingModeStretch img:[UIImage imageNamed:@"tp_01_img_list_bg_01"]];
-
+    _collectionView.delegate = self;
+    _collectionView.dataSource = self;
+    _collectionView.scrollEnabled = NO;
+    _collectionView.backgroundColor = kUIBgColor01;
 
     [self setThingsPopoverOptions];
 }
@@ -143,11 +107,6 @@
 }
 
 - (void)refreshHomeMemberList {
-    if (_groups && _groups.count) {
-        [_groups removeAllObjects];
-        _groups = nil;
-    }
-
     [self requestHomeMemberList];
 }
 
@@ -180,227 +139,88 @@
         NSArray<HomeMemberModel> *homegrpMemberList = fetchedMemberList.homegrpMemberList;
 
         if (homegrpMemberList && homegrpMemberList.count) {
-            _groups = [[NSMutableArray alloc] init];
-            _arrayForHeader = [[NSMutableArray alloc] init]; //헤더 저장용으로 사용
-
-            NSIndexSet *isComplete = [homegrpMemberList indexesOfObjectsPassingTest:^BOOL(HomeMemberModel *lmember, NSUInteger idx, BOOL *stop) {//초대완료
-                return [lmember.invitation isEqualToString:@"11"];
-            }];
-            NSIndexSet *isProgress = [homegrpMemberList indexesOfObjectsPassingTest:^BOOL(HomeMemberModel *lmember, NSUInteger idx, BOOL *stop) {//초대 중
-                return [lmember.invitation isEqualToString:@"01"];
-            }];
-            NSIndexSet *isReject = [homegrpMemberList indexesOfObjectsPassingTest:^BOOL(HomeMemberModel *lmember, NSUInteger idx, BOOL *stop) {//초대 거절
-                return [lmember.invitation isEqualToString:@"23"];
-            }];
-
-            [_groups addObject:[NSMutableDictionary dictionaryWithDictionary:@{@"list":[homegrpMemberList objectsAtIndexes:isComplete]}]];
-            [_groups addObject:[NSMutableDictionary dictionaryWithDictionary:@{@"list":[homegrpMemberList objectsAtIndexes:isProgress]}]];
-            [_groups addObject:[NSMutableDictionary dictionaryWithDictionary:@{@"list":[homegrpMemberList objectsAtIndexes:isReject]}]];
+            _memberList = homegrpMemberList;
 
         } else {//조회 내역이 없을 경우,
 
         }
 
-        [_tableView reloadData];
+        [_collectionView reloadData];
 
     } failure:^(id errorObject) {
         JDErrorModel *error = (JDErrorModel *)errorObject;
         [[JDFacade facade] alert:error.errorMessage];
     }];
-
-}
-
-#pragma mark - UITableView DataSource & Delegate
-
-- (NSString *)titleForSection:(NSInteger)section {
-    NSString *title = nil;
-    switch (section) {
-        case 0:
-            title = NSLocalizedString(@"이용 중인 멤버", @"이용 중인 멤버");
-            break;
-        case 1:
-            title = NSLocalizedString(@"초대 중인 멤버", @"초대 중인 멤버");
-            break;
-        case 2:
-            title = NSLocalizedString(@"거절한 멤버", @"거절한 멤버");
-            break;
-    }
-    return title;
-}
-
-- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
-    return _groups.count + ([JDFacade facade].loginHomeGroup.level == 90 ? 1 : 0);
-}
-
-- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
-    if (section == _groups.count) {
-        return nil;
-    }
-
-    if (!_groups.count) {
-        return nil;
-    }
-
-    NSMutableDictionary *group = _groups[section];
-    UIView *view = _arrayForHeader.count > section ? _arrayForHeader[section] : nil;
-    if (!view) {
-        MemberHeaderTableViewCell *hcell = (MemberHeaderTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"HeaderCellIdentifier"];
-
-        view = [[UIView alloc] initWithFrame:hcell.contentView.frame];
-        [view addSubview:hcell];
-
-        //        NSLog(@"hcell=%p", &hcell);
-        hcell.delegate = self;
-        hcell.section = section;
-        hcell.group = group;
-
-
-        NSString *headerTitle = [NSString stringWithFormat:@"%@", [self titleForSection:section]];
-        [hcell.btnHeader setTitle:headerTitle forState:UIControlStateNormal];
-
-        if (_arrayForHeader.count == section) {
-            [_arrayForHeader insertObject:view atIndex:section];
-        }
-    } else {
-        MemberHeaderTableViewCell *hcell = (MemberHeaderTableViewCell *)view.subviews[0];
-        NSString *headerTitle = [NSString stringWithFormat:@"%@", [self titleForSection:section]];
-        [hcell.btnHeader setTitle:headerTitle forState:UIControlStateNormal];
-    }
-
-    return view;
 }
 
-- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
+#pragma mark - UICollectionView Delegate
 
-    if (section == _groups.count) {
-        return 0.01f;
-    }
-    return 40.0f;
+- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
+    NSInteger count = _memberList.count % 2 == 0 ? _memberList.count : _memberList.count + 1; //홀수일 경우, 멤버 초대 버튼을 추가해줌.
+    return _memberList.count;
 }
 
-- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
-    return 0.01f;
-}
-
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-
-    if (_groups.count == section) {//추가 셀,
-        return 1;
-    }
-
-    NSMutableDictionary *group = _groups[section];
-    NSArray<HomeMemberModel> *memberList = group[@"list"];
-    if ([group[@"unfold"] boolValue]) {
-        return 0;
-    }
-
-    return memberList.count;
-}
-
-- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
-    CGFloat height = kfMemberTableViewCellHeight;
-
-    if (indexPath.section == _groups.count) {
-        height = _groups.count ? 210.0f : IPHONE_HEIGHT - kfNavigationBarHeight;
-        _tableView.scrollEnabled = _groups.count;
-    }
-
-    return height;
-}
-
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-
-    UITableViewCell *cell = nil;
-
-//    NSInteger section = indexPath.section;
-    if (indexPath.section < _groups.count) {
-        NSMutableDictionary *group = _groups[indexPath.section];
-        NSArray<HomeMemberModel> *memberList = group[@"list"];
-        HomeMemberModel *member = memberList[indexPath.row];
-
-        MemberTableViewCell *tcell = [tableView dequeueReusableCellWithIdentifier:@"CellIdentifier"];
-
-        if (tcell == nil) {
-            tcell = [[MemberTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CellIdentifier"];
-        }
-
-        tcell.lblTitle.text = member.nickname;
-        tcell.lblLevel.text = [NSString stringWithFormat:@"[%@]", member.gradeCodeName];
-        [tcell.btnMemberIcon sd_setImageWithURL:[NSURL URLWithString:member.imageFileName] forState:UIControlStateNormal];
-
-        cell = tcell;
-
-        //set background image
-        if (indexPath.row % 2 == 1) {
-            cell.backgroundView = [[UIImageView alloc] initWithImage:_bgCellImage1];
-        } else {
-            cell.backgroundView = [[UIImageView alloc] initWithImage:_bgCellImage2];
-        }
-
-    } else {
-        MemberAddTableViewCell *acell = [tableView dequeueReusableCellWithIdentifier:@"AddCellIdentifier"];
-
-        if (acell == nil) {
-            acell = [[MemberAddTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"AddCellIdentifier"];
-        }
-        cell = acell;
+- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
+    
+    static NSString *kCellID = @"CollectionCellIdentifier";
+    HomeMemberCollectionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:kCellID forIndexPath:indexPath];
+    
+    HomeMemberModel *member = nil;
+    if (indexPath.row < _memberList.count) {
+        member = _memberList[indexPath.row];
     }
+    
+    cell.indexPath = indexPath;
+//    cell.btnMemberIcon.value = memberIcon;
+//    cell.btnCover.value = cell.btnMemberIcon;
+    
+    [cell.imgvMemberIcon sd_setImageWithURL:[NSURL URLWithString:member.imageFileName] placeholderImage:nil options:SDWebImageRefreshCached];
+    [cell.imgvMemberIcon setContentMode:UIViewContentModeScaleAspectFit];
 
+    cell.lblNickname.text = member.nickname;
+    cell.lblStatus.text = member.gradeCodeName;
+    
     return cell;
 }
 
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    [tableView deselectRowAtIndexPath:indexPath animated:YES];
-
-    if (indexPath.section == _groups.count) {//add new
-        [self addNewMember];
-        return;
-    }
 
-    if ([JDFacade facade].loginHomeGroup.level == 90) {//마스터일 경우에만, 상세로 이동
-        
-        NSMutableDictionary *group = _groups[indexPath.section];
-        NSArray<HomeMemberModel> *memberList = group[@"list"];
-        HomeMemberModel *member = memberList[indexPath.row];
-        
-        HomeMemberDetailViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"HomeMemberDetailViewController" storyboardName:@"HomeMember"];
-        vc.member = member;
-        [self.navigationController pushViewController:vc animated:YES];
+/*
+- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView
+           viewForSupplementaryElementOfKind:(NSString *)kind
+                                 atIndexPath:(NSIndexPath *)indexPath
+{
+    HomeMemberCollectionFooterView *footerView = nil;
+    if (indexPath.row == _memberList.count) {
+//    MemberIconeHeaderView *headerView = [collectionView dequeueReusableSupplementaryViewOfKind:
+//                                         UICollectionElementKindSectionHeader withReuseIdentifier:@"HeaderView" forIndexPath:indexPath];
+//    return headerView;
     }
 }
+*/
 
-
-- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
-
-    // Remove seperator inset
-    if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
-        [cell setSeparatorInset:UIEdgeInsetsZero];
-    }
-
-    // Prevent the cell from inheriting the Table View's margin settings
-    if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) {
-        [cell setPreservesSuperviewLayoutMargins:NO];
-    }
-
-    // Explictly set your cell's layout margins
-    if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
-        [cell setLayoutMargins:UIEdgeInsetsZero];
+- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
+    if (IPHONE_WIDTH == 414.0f) {//아이폰 6일 경우,
+        return CGSizeMake(212.0f, 160.0f);
+        
+    } else if (IPHONE_WIDTH == 375.0f) {//아이폰 6+일경우
+        return CGSizeMake(187.5, 160.0f);
     }
+    return CGSizeMake(160.0f, 160.0f);
 }
 
-#pragma mark - MemberHeaderTableViewCellDelegate
-- (void)didMemberHeaderTableViewCellBtnHeaderTouched:(id)sender {
-
-    MemberHeaderTableViewCell *hcell = (MemberHeaderTableViewCell *)sender;
-    BOOL isExpanded = ![hcell.group[@"unfold"] boolValue];
+#pragma mark - UI Events
+//- (IBAction)btnCoverIconTouched:(id)sender {
+//    
+//    if (_selectedCoverIcon) {
+//        [_selectedCoverIcon faceOffImage];
+//    }
+//    
+//    CustomButton *btn = (CustomButton *)sender;
+//    _selectedCoverIcon = btn;
+//    [_selectedCoverIcon faceOffImage];
+//}
 
-    [_tableView enumarateTableViewCellsSection:hcell.section UsingBlock:^(UITableViewCell *cell) {
-        MemberHeaderTableViewCell *tmpCell = (MemberHeaderTableViewCell *)cell;
-        tmpCell.contentView.hidden = isExpanded;
-    }];
 
-    [_tableView reloadData];
-}
 
 #pragma mark - UI Events