├── README.md └── 仿造淘宝商品详情页 ├── .gitignore ├── 仿造淘宝商品详情页.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── yixiang.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── yixiang.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── 仿造淘宝商品详情页.xcscheme └── 仿造淘宝商品详情页 ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets ├── AppIcon.appiconset │ └── Contents.json ├── Contents.json └── item.imageset │ ├── Contents.json │ └── item.jpg ├── Base.lproj ├── LaunchScreen.storyboard └── Main.storyboard ├── Info.plist ├── View ├── CommentView.h ├── CommentView.m ├── ItemDetailView.h ├── ItemDetailView.m ├── PicAndTextIntroduceView.h ├── PicAndTextIntroduceView.m ├── YX.h ├── YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.h ├── YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.m ├── YXIgnoreHeaderTouchTableView.h ├── YXIgnoreHeaderTouchTableView.m ├── YXTabItemBaseView.h ├── YXTabItemBaseView.m ├── YXTabTitleView.h ├── YXTabTitleView.m ├── YXTabView.h └── YXTabView.m ├── ViewController.h ├── ViewController.m └── main.m /README.md: -------------------------------------------------------------------------------- 1 | #UITableview嵌套UITableView案例实践(仿淘宝商品详情页实现) 2 | 3 | ##一、案例演示 4 | 5 | IOS中提供的UITableView功能非常强大,section提供分组,cell提供显示,几乎可以应付绝大部分场景。最近想模仿旧版的淘宝的商品详情页(最新的淘宝详情页商品详情和图文详情是两个页面)写一个Demo,后来发现单纯使用UITableView来布局是比较困难的。因为旧版的淘宝详情页中,最外层的View肯定是一个UITableView,但是内层的Tab中,图文介绍、商品详情和评价三个Tab对应的内容非常丰富,如果你把这三块内容放在一个section中的话,将导致数据组织非常困难,并且UI的灵活度也大大降低。所以最后准备尝试使用UITableView嵌套UITableView的方式来组织UI,最外层是一个UITableView,三个Tab其实是一个横向ScrollView,这个ScrollView里面包含三个UITableView。并且Tab中的内容采用动态可配置话的方式生成(下面详解)。实现的效果如下: 6 | 7 | ![仿造淘宝详情页](http://img.my.csdn.net/uploads/201603/29/1459239785_4388.gif) 8 | 9 | ##二、项目详解 10 | 11 | ###2.1、大体思路 12 | 13 | 使内层的UITableView(TAB栏里面)和外层的UITableView同时响应用户的手势滑动事件。当用户从页面顶端从下往上滑动到TAB栏的过程中,使外层的UITableView跟随用户手势滑动,内层的UITableView不跟随手势滑动。当用户继续往上滑动的时候,让外层的UITableView不跟随手势滑动,让内层的UITableView跟随手势滑动。反之从下往上滑动也一样。 14 | 15 | 如上图所示,外层的section0为价格区,可以自定义。section1为sku区,也可以自定义。section2为TAB区域,该区域采用Runtime反射机制,动态配置完成。 16 | 17 | ###2.2、具体实现 18 | 19 | ####2.2.1、YXIgnoreHeaderTouchTableView 20 | 21 | 我们顶部的图片其实是覆盖在外层UITableView的tableHeaderView的下面,我们把tableHeaderView设置为透明。这样实现是为了方便我们在滑动的时候,动态的改变图片的宽高,实现列表头部能够动态拉伸的效果。但是我们对于UITableView不做处理的时候,该图片是无法响应点击事件的,因为被tableHeaderView提前消费了。所以我们要不让tableHeaderView不响应点击事件。我们在YXIgnoreHeaderTouchTableView的实现文件中重写以下方法。 22 | 23 | ```objective-c 24 | - (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event { 25 | if (self.tableHeaderView && CGRectContainsPoint(self.tableHeaderView.frame, point)) { 26 | return NO; 27 | } 28 | return [super pointInside:point withEvent:event]; 29 | } 30 | ``` 31 | 32 | ####2.2.2、 YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView 33 | 34 | 该文件继承于YXIgnoreHeaderTouchTableView,除此之外,主要是为了让外层的UITableView能够显示外层UITableView的滑动事件。我们需要实现以下代理方法。 35 | 36 | ```objective-c 37 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { 38 | return YES; 39 | } 40 | ``` 41 | 42 | ####2.2.3、YXTabView 43 | 44 | 该文件是TAB区域主文件,显示的标题的内容都是通过以下字典动态生成。 45 | 46 | ```ob 47 | if(section==2){ 48 | NSArray *tabConfigArray = @[@{ 49 | @"title":@"图文介绍", 50 | @"view":@"PicAndTextIntroduceView", 51 | @"data":@"图文介绍的数据", 52 | @"position":@0 53 | },@{ 54 | @"title":@"商品详情", 55 | @"view":@"ItemDetailView", 56 | @"data":@"商品详情的数据", 57 | @"position":@1 58 | },@{ 59 | @"title":@"评价(273)", 60 | @"view":@"CommentView", 61 | @"data":@"评价的数据", 62 | @"position":@2 63 | }]; 64 | YXTabView *tabView = [[YXTabView alloc] initWithTabConfigArray:tabConfigArray]; 65 | [cell.contentView addSubview:tabView]; 66 | } 67 | ``` 68 | 69 | title:TAB每个Item的标题。 70 | 71 | view:TAB每个Item的内容。 72 | 73 | data:TAB每个Item内容渲染需要的数据。 74 | 75 | position:TAB的位置。从0开始。 76 | 77 | 该TAB其实是有YXTabTitleView(标题栏)和一个横向的ScrollView(内层多个UITableView的容器)构成。内层多个UITableView通过以上配置文件动态生成。如下如示: 78 | 79 | ```objective-c 80 | for (int i=0; i=tabOffsetY) { 164 | scrollView.contentOffset = CGPointMake(0, tabOffsetY); 165 | _isTopIsCanNotMoveTabView = YES; 166 | }else{ 167 | _isTopIsCanNotMoveTabView = NO; 168 | } 169 | if (_isTopIsCanNotMoveTabView != _isTopIsCanNotMoveTabViewPre) { 170 | if (!_isTopIsCanNotMoveTabViewPre && _isTopIsCanNotMoveTabView) { 171 | //NSLog(@"滑动到顶端"); 172 | [[NSNotificationCenter defaultCenter] postNotificationName:kGoTopNotificationName object:nil userInfo:@{@"canScroll":@"1"}]; 173 | _canScroll = NO; 174 | } 175 | if(_isTopIsCanNotMoveTabViewPre && !_isTopIsCanNotMoveTabView){ 176 | //NSLog(@"离开顶端"); 177 | if (!_canScroll) { 178 | scrollView.contentOffset = CGPointMake(0, tabOffsetY); 179 | } 180 | } 181 | } 182 | } 183 | ``` 184 | 185 | ##三、完整源码下载地址 186 | 187 | github下载地址:[https://github.com/yixiangboy/YX_UITableView_IN_UITableView](https://github.com/yixiangboy/YX_UITableView_IN_UITableView) 188 | 如果对你有用,star一下吧。 189 | 190 | ##四、联系方式 191 | 192 | 微博:[新浪微博](http://weibo.com/5612984599/profile?topnav=1&wvr=6) 193 | 194 | 博客:[http://blog.csdn.net/yixiangboy](http://blog.csdn.net/yixiangboy) 195 | 196 | github:[https://github.com/yixiangboy](https://github.com/yixiangboy) 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/.gitignore: -------------------------------------------------------------------------------- 1 | DerivedData/ -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | DA0614C81CA37FDA005A1142 /* YXIgnoreHeaderTouchTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = DA0614C71CA37FDA005A1142 /* YXIgnoreHeaderTouchTableView.m */; settings = {ASSET_TAGS = (); }; }; 11 | DA9858F41CAA57C20078FA77 /* YXTabItemBaseView.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9858F31CAA57C20078FA77 /* YXTabItemBaseView.m */; settings = {ASSET_TAGS = (); }; }; 12 | DAA4F9C81CA2A4B400BA9D19 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DAA4F9C71CA2A4B400BA9D19 /* main.m */; }; 13 | DAA4F9CB1CA2A4B400BA9D19 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DAA4F9CA1CA2A4B400BA9D19 /* AppDelegate.m */; }; 14 | DAA4F9CE1CA2A4B400BA9D19 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DAA4F9CD1CA2A4B400BA9D19 /* ViewController.m */; }; 15 | DAA4F9D11CA2A4B400BA9D19 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DAA4F9CF1CA2A4B400BA9D19 /* Main.storyboard */; }; 16 | DAA4F9D31CA2A4B400BA9D19 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DAA4F9D21CA2A4B400BA9D19 /* Assets.xcassets */; }; 17 | DAA4F9D61CA2A4B400BA9D19 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DAA4F9D41CA2A4B400BA9D19 /* LaunchScreen.storyboard */; }; 18 | DABC37061CA50D8600FAA182 /* YXTabView.m in Sources */ = {isa = PBXBuildFile; fileRef = DABC37051CA50D8600FAA182 /* YXTabView.m */; settings = {ASSET_TAGS = (); }; }; 19 | DABC37091CA5112200FAA182 /* YXTabTitleView.m in Sources */ = {isa = PBXBuildFile; fileRef = DABC37081CA5112200FAA182 /* YXTabTitleView.m */; settings = {ASSET_TAGS = (); }; }; 20 | DABC370C1CA539CC00FAA182 /* PicAndTextIntroduceView.m in Sources */ = {isa = PBXBuildFile; fileRef = DABC370B1CA539CC00FAA182 /* PicAndTextIntroduceView.m */; settings = {ASSET_TAGS = (); }; }; 21 | DABC370F1CA539FF00FAA182 /* ItemDetailView.m in Sources */ = {isa = PBXBuildFile; fileRef = DABC370E1CA539FF00FAA182 /* ItemDetailView.m */; settings = {ASSET_TAGS = (); }; }; 22 | DABC37121CA53A1300FAA182 /* CommentView.m in Sources */ = {isa = PBXBuildFile; fileRef = DABC37111CA53A1300FAA182 /* CommentView.m */; settings = {ASSET_TAGS = (); }; }; 23 | DABC37181CA562DD00FAA182 /* YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = DABC37171CA562DD00FAA182 /* YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.m */; settings = {ASSET_TAGS = (); }; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXFileReference section */ 27 | DA0614C61CA37FDA005A1142 /* YXIgnoreHeaderTouchTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YXIgnoreHeaderTouchTableView.h; sourceTree = ""; }; 28 | DA0614C71CA37FDA005A1142 /* YXIgnoreHeaderTouchTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YXIgnoreHeaderTouchTableView.m; sourceTree = ""; }; 29 | DA9858F11CAA532A0078FA77 /* YX.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YX.h; sourceTree = ""; }; 30 | DA9858F21CAA57C20078FA77 /* YXTabItemBaseView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YXTabItemBaseView.h; sourceTree = ""; }; 31 | DA9858F31CAA57C20078FA77 /* YXTabItemBaseView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YXTabItemBaseView.m; sourceTree = ""; }; 32 | DAA4F9C31CA2A4B400BA9D19 /* 仿造淘宝商品详情页.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "仿造淘宝商品详情页.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | DAA4F9C71CA2A4B400BA9D19 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 34 | DAA4F9C91CA2A4B400BA9D19 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 35 | DAA4F9CA1CA2A4B400BA9D19 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 36 | DAA4F9CC1CA2A4B400BA9D19 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 37 | DAA4F9CD1CA2A4B400BA9D19 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 38 | DAA4F9D01CA2A4B400BA9D19 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 39 | DAA4F9D21CA2A4B400BA9D19 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 40 | DAA4F9D51CA2A4B400BA9D19 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 41 | DAA4F9D71CA2A4B400BA9D19 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 42 | DABC37041CA50D8600FAA182 /* YXTabView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YXTabView.h; sourceTree = ""; }; 43 | DABC37051CA50D8600FAA182 /* YXTabView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YXTabView.m; sourceTree = ""; }; 44 | DABC37071CA5112200FAA182 /* YXTabTitleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YXTabTitleView.h; sourceTree = ""; }; 45 | DABC37081CA5112200FAA182 /* YXTabTitleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YXTabTitleView.m; sourceTree = ""; }; 46 | DABC370A1CA539CC00FAA182 /* PicAndTextIntroduceView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PicAndTextIntroduceView.h; sourceTree = ""; }; 47 | DABC370B1CA539CC00FAA182 /* PicAndTextIntroduceView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PicAndTextIntroduceView.m; sourceTree = ""; }; 48 | DABC370D1CA539FF00FAA182 /* ItemDetailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ItemDetailView.h; sourceTree = ""; }; 49 | DABC370E1CA539FF00FAA182 /* ItemDetailView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ItemDetailView.m; sourceTree = ""; }; 50 | DABC37101CA53A1300FAA182 /* CommentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommentView.h; sourceTree = ""; }; 51 | DABC37111CA53A1300FAA182 /* CommentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommentView.m; sourceTree = ""; }; 52 | DABC37161CA562DD00FAA182 /* YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.h; sourceTree = ""; }; 53 | DABC37171CA562DD00FAA182 /* YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.m; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | DAA4F9C01CA2A4B400BA9D19 /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | ); 62 | runOnlyForDeploymentPostprocessing = 0; 63 | }; 64 | /* End PBXFrameworksBuildPhase section */ 65 | 66 | /* Begin PBXGroup section */ 67 | DA0614C51CA37F9C005A1142 /* View */ = { 68 | isa = PBXGroup; 69 | children = ( 70 | DA0614C61CA37FDA005A1142 /* YXIgnoreHeaderTouchTableView.h */, 71 | DA0614C71CA37FDA005A1142 /* YXIgnoreHeaderTouchTableView.m */, 72 | DABC37041CA50D8600FAA182 /* YXTabView.h */, 73 | DABC37051CA50D8600FAA182 /* YXTabView.m */, 74 | DABC37071CA5112200FAA182 /* YXTabTitleView.h */, 75 | DABC37081CA5112200FAA182 /* YXTabTitleView.m */, 76 | DABC370A1CA539CC00FAA182 /* PicAndTextIntroduceView.h */, 77 | DABC370B1CA539CC00FAA182 /* PicAndTextIntroduceView.m */, 78 | DABC370D1CA539FF00FAA182 /* ItemDetailView.h */, 79 | DABC370E1CA539FF00FAA182 /* ItemDetailView.m */, 80 | DABC37101CA53A1300FAA182 /* CommentView.h */, 81 | DABC37111CA53A1300FAA182 /* CommentView.m */, 82 | DABC37161CA562DD00FAA182 /* YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.h */, 83 | DABC37171CA562DD00FAA182 /* YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.m */, 84 | DA9858F11CAA532A0078FA77 /* YX.h */, 85 | DA9858F21CAA57C20078FA77 /* YXTabItemBaseView.h */, 86 | DA9858F31CAA57C20078FA77 /* YXTabItemBaseView.m */, 87 | ); 88 | path = View; 89 | sourceTree = ""; 90 | }; 91 | DAA4F9BA1CA2A4B400BA9D19 = { 92 | isa = PBXGroup; 93 | children = ( 94 | DAA4F9C51CA2A4B400BA9D19 /* 仿造淘宝商品详情页 */, 95 | DAA4F9C41CA2A4B400BA9D19 /* Products */, 96 | ); 97 | sourceTree = ""; 98 | }; 99 | DAA4F9C41CA2A4B400BA9D19 /* Products */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | DAA4F9C31CA2A4B400BA9D19 /* 仿造淘宝商品详情页.app */, 103 | ); 104 | name = Products; 105 | sourceTree = ""; 106 | }; 107 | DAA4F9C51CA2A4B400BA9D19 /* 仿造淘宝商品详情页 */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | DA0614C51CA37F9C005A1142 /* View */, 111 | DAA4F9C91CA2A4B400BA9D19 /* AppDelegate.h */, 112 | DAA4F9CA1CA2A4B400BA9D19 /* AppDelegate.m */, 113 | DAA4F9CC1CA2A4B400BA9D19 /* ViewController.h */, 114 | DAA4F9CD1CA2A4B400BA9D19 /* ViewController.m */, 115 | DAA4F9CF1CA2A4B400BA9D19 /* Main.storyboard */, 116 | DAA4F9D21CA2A4B400BA9D19 /* Assets.xcassets */, 117 | DAA4F9D41CA2A4B400BA9D19 /* LaunchScreen.storyboard */, 118 | DAA4F9D71CA2A4B400BA9D19 /* Info.plist */, 119 | DAA4F9C61CA2A4B400BA9D19 /* Supporting Files */, 120 | ); 121 | path = "仿造淘宝商品详情页"; 122 | sourceTree = ""; 123 | }; 124 | DAA4F9C61CA2A4B400BA9D19 /* Supporting Files */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | DAA4F9C71CA2A4B400BA9D19 /* main.m */, 128 | ); 129 | name = "Supporting Files"; 130 | sourceTree = ""; 131 | }; 132 | /* End PBXGroup section */ 133 | 134 | /* Begin PBXNativeTarget section */ 135 | DAA4F9C21CA2A4B400BA9D19 /* 仿造淘宝商品详情页 */ = { 136 | isa = PBXNativeTarget; 137 | buildConfigurationList = DAA4F9DA1CA2A4B400BA9D19 /* Build configuration list for PBXNativeTarget "仿造淘宝商品详情页" */; 138 | buildPhases = ( 139 | DAA4F9BF1CA2A4B400BA9D19 /* Sources */, 140 | DAA4F9C01CA2A4B400BA9D19 /* Frameworks */, 141 | DAA4F9C11CA2A4B400BA9D19 /* Resources */, 142 | ); 143 | buildRules = ( 144 | ); 145 | dependencies = ( 146 | ); 147 | name = "仿造淘宝商品详情页"; 148 | productName = "仿造淘宝商品详情页"; 149 | productReference = DAA4F9C31CA2A4B400BA9D19 /* 仿造淘宝商品详情页.app */; 150 | productType = "com.apple.product-type.application"; 151 | }; 152 | /* End PBXNativeTarget section */ 153 | 154 | /* Begin PBXProject section */ 155 | DAA4F9BB1CA2A4B400BA9D19 /* Project object */ = { 156 | isa = PBXProject; 157 | attributes = { 158 | LastUpgradeCheck = 0700; 159 | ORGANIZATIONNAME = yixiang; 160 | TargetAttributes = { 161 | DAA4F9C21CA2A4B400BA9D19 = { 162 | CreatedOnToolsVersion = 7.0; 163 | DevelopmentTeam = 2M632FEG3H; 164 | }; 165 | }; 166 | }; 167 | buildConfigurationList = DAA4F9BE1CA2A4B400BA9D19 /* Build configuration list for PBXProject "仿造淘宝商品详情页" */; 168 | compatibilityVersion = "Xcode 3.2"; 169 | developmentRegion = English; 170 | hasScannedForEncodings = 0; 171 | knownRegions = ( 172 | en, 173 | Base, 174 | ); 175 | mainGroup = DAA4F9BA1CA2A4B400BA9D19; 176 | productRefGroup = DAA4F9C41CA2A4B400BA9D19 /* Products */; 177 | projectDirPath = ""; 178 | projectRoot = ""; 179 | targets = ( 180 | DAA4F9C21CA2A4B400BA9D19 /* 仿造淘宝商品详情页 */, 181 | ); 182 | }; 183 | /* End PBXProject section */ 184 | 185 | /* Begin PBXResourcesBuildPhase section */ 186 | DAA4F9C11CA2A4B400BA9D19 /* Resources */ = { 187 | isa = PBXResourcesBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | DAA4F9D61CA2A4B400BA9D19 /* LaunchScreen.storyboard in Resources */, 191 | DAA4F9D31CA2A4B400BA9D19 /* Assets.xcassets in Resources */, 192 | DAA4F9D11CA2A4B400BA9D19 /* Main.storyboard in Resources */, 193 | ); 194 | runOnlyForDeploymentPostprocessing = 0; 195 | }; 196 | /* End PBXResourcesBuildPhase section */ 197 | 198 | /* Begin PBXSourcesBuildPhase section */ 199 | DAA4F9BF1CA2A4B400BA9D19 /* Sources */ = { 200 | isa = PBXSourcesBuildPhase; 201 | buildActionMask = 2147483647; 202 | files = ( 203 | DABC370F1CA539FF00FAA182 /* ItemDetailView.m in Sources */, 204 | DAA4F9CE1CA2A4B400BA9D19 /* ViewController.m in Sources */, 205 | DA0614C81CA37FDA005A1142 /* YXIgnoreHeaderTouchTableView.m in Sources */, 206 | DAA4F9CB1CA2A4B400BA9D19 /* AppDelegate.m in Sources */, 207 | DABC37121CA53A1300FAA182 /* CommentView.m in Sources */, 208 | DABC37181CA562DD00FAA182 /* YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.m in Sources */, 209 | DAA4F9C81CA2A4B400BA9D19 /* main.m in Sources */, 210 | DABC37091CA5112200FAA182 /* YXTabTitleView.m in Sources */, 211 | DA9858F41CAA57C20078FA77 /* YXTabItemBaseView.m in Sources */, 212 | DABC370C1CA539CC00FAA182 /* PicAndTextIntroduceView.m in Sources */, 213 | DABC37061CA50D8600FAA182 /* YXTabView.m in Sources */, 214 | ); 215 | runOnlyForDeploymentPostprocessing = 0; 216 | }; 217 | /* End PBXSourcesBuildPhase section */ 218 | 219 | /* Begin PBXVariantGroup section */ 220 | DAA4F9CF1CA2A4B400BA9D19 /* Main.storyboard */ = { 221 | isa = PBXVariantGroup; 222 | children = ( 223 | DAA4F9D01CA2A4B400BA9D19 /* Base */, 224 | ); 225 | name = Main.storyboard; 226 | sourceTree = ""; 227 | }; 228 | DAA4F9D41CA2A4B400BA9D19 /* LaunchScreen.storyboard */ = { 229 | isa = PBXVariantGroup; 230 | children = ( 231 | DAA4F9D51CA2A4B400BA9D19 /* Base */, 232 | ); 233 | name = LaunchScreen.storyboard; 234 | sourceTree = ""; 235 | }; 236 | /* End PBXVariantGroup section */ 237 | 238 | /* Begin XCBuildConfiguration section */ 239 | DAA4F9D81CA2A4B400BA9D19 /* Debug */ = { 240 | isa = XCBuildConfiguration; 241 | buildSettings = { 242 | ALWAYS_SEARCH_USER_PATHS = NO; 243 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 244 | CLANG_CXX_LIBRARY = "libc++"; 245 | CLANG_ENABLE_MODULES = YES; 246 | CLANG_ENABLE_OBJC_ARC = YES; 247 | CLANG_WARN_BOOL_CONVERSION = YES; 248 | CLANG_WARN_CONSTANT_CONVERSION = YES; 249 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 250 | CLANG_WARN_EMPTY_BODY = YES; 251 | CLANG_WARN_ENUM_CONVERSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 254 | CLANG_WARN_UNREACHABLE_CODE = YES; 255 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 256 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 257 | COPY_PHASE_STRIP = NO; 258 | DEBUG_INFORMATION_FORMAT = dwarf; 259 | ENABLE_STRICT_OBJC_MSGSEND = YES; 260 | ENABLE_TESTABILITY = YES; 261 | GCC_C_LANGUAGE_STANDARD = gnu99; 262 | GCC_DYNAMIC_NO_PIC = NO; 263 | GCC_NO_COMMON_BLOCKS = YES; 264 | GCC_OPTIMIZATION_LEVEL = 0; 265 | GCC_PREPROCESSOR_DEFINITIONS = ( 266 | "DEBUG=1", 267 | "$(inherited)", 268 | ); 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 276 | MTL_ENABLE_DEBUG_INFO = YES; 277 | ONLY_ACTIVE_ARCH = YES; 278 | SDKROOT = iphoneos; 279 | }; 280 | name = Debug; 281 | }; 282 | DAA4F9D91CA2A4B400BA9D19 /* Release */ = { 283 | isa = XCBuildConfiguration; 284 | buildSettings = { 285 | ALWAYS_SEARCH_USER_PATHS = NO; 286 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 287 | CLANG_CXX_LIBRARY = "libc++"; 288 | CLANG_ENABLE_MODULES = YES; 289 | CLANG_ENABLE_OBJC_ARC = YES; 290 | CLANG_WARN_BOOL_CONVERSION = YES; 291 | CLANG_WARN_CONSTANT_CONVERSION = YES; 292 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 293 | CLANG_WARN_EMPTY_BODY = YES; 294 | CLANG_WARN_ENUM_CONVERSION = YES; 295 | CLANG_WARN_INT_CONVERSION = YES; 296 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 297 | CLANG_WARN_UNREACHABLE_CODE = YES; 298 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 299 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 300 | COPY_PHASE_STRIP = NO; 301 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 302 | ENABLE_NS_ASSERTIONS = NO; 303 | ENABLE_STRICT_OBJC_MSGSEND = YES; 304 | GCC_C_LANGUAGE_STANDARD = gnu99; 305 | GCC_NO_COMMON_BLOCKS = YES; 306 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 307 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 308 | GCC_WARN_UNDECLARED_SELECTOR = YES; 309 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 310 | GCC_WARN_UNUSED_FUNCTION = YES; 311 | GCC_WARN_UNUSED_VARIABLE = YES; 312 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 313 | MTL_ENABLE_DEBUG_INFO = NO; 314 | SDKROOT = iphoneos; 315 | VALIDATE_PRODUCT = YES; 316 | }; 317 | name = Release; 318 | }; 319 | DAA4F9DB1CA2A4B400BA9D19 /* Debug */ = { 320 | isa = XCBuildConfiguration; 321 | buildSettings = { 322 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 323 | INFOPLIST_FILE = "仿造淘宝商品详情页/Info.plist"; 324 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 325 | PRODUCT_BUNDLE_IDENTIFIER = "alibaba.---------"; 326 | PRODUCT_NAME = "$(TARGET_NAME)"; 327 | }; 328 | name = Debug; 329 | }; 330 | DAA4F9DC1CA2A4B400BA9D19 /* Release */ = { 331 | isa = XCBuildConfiguration; 332 | buildSettings = { 333 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 334 | INFOPLIST_FILE = "仿造淘宝商品详情页/Info.plist"; 335 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 336 | PRODUCT_BUNDLE_IDENTIFIER = "alibaba.---------"; 337 | PRODUCT_NAME = "$(TARGET_NAME)"; 338 | }; 339 | name = Release; 340 | }; 341 | /* End XCBuildConfiguration section */ 342 | 343 | /* Begin XCConfigurationList section */ 344 | DAA4F9BE1CA2A4B400BA9D19 /* Build configuration list for PBXProject "仿造淘宝商品详情页" */ = { 345 | isa = XCConfigurationList; 346 | buildConfigurations = ( 347 | DAA4F9D81CA2A4B400BA9D19 /* Debug */, 348 | DAA4F9D91CA2A4B400BA9D19 /* Release */, 349 | ); 350 | defaultConfigurationIsVisible = 0; 351 | defaultConfigurationName = Release; 352 | }; 353 | DAA4F9DA1CA2A4B400BA9D19 /* Build configuration list for PBXNativeTarget "仿造淘宝商品详情页" */ = { 354 | isa = XCConfigurationList; 355 | buildConfigurations = ( 356 | DAA4F9DB1CA2A4B400BA9D19 /* Debug */, 357 | DAA4F9DC1CA2A4B400BA9D19 /* Release */, 358 | ); 359 | defaultConfigurationIsVisible = 0; 360 | defaultConfigurationName = Release; 361 | }; 362 | /* End XCConfigurationList section */ 363 | }; 364 | rootObject = DAA4F9BB1CA2A4B400BA9D19 /* Project object */; 365 | } 366 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页.xcodeproj/project.xcworkspace/xcuserdata/yixiang.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kopuCoder/YX_UITableView_IN_UITableView/875a9d6738daaf6ad4f8841293e5fae08aabb481/仿造淘宝商品详情页/仿造淘宝商品详情页.xcodeproj/project.xcworkspace/xcuserdata/yixiang.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页.xcodeproj/xcuserdata/yixiang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页.xcodeproj/xcuserdata/yixiang.xcuserdatad/xcschemes/仿造淘宝商品详情页.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/23. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/23. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/Assets.xcassets/item.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "item.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/Assets.xcassets/item.imageset/item.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kopuCoder/YX_UITableView_IN_UITableView/875a9d6738daaf6ad4f8841293e5fae08aabb481/仿造淘宝商品详情页/仿造淘宝商品详情页/Assets.xcassets/item.imageset/item.jpg -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/CommentView.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentView.h 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/25. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "YXTabItemBaseView.h" 11 | 12 | @interface CommentView : YXTabItemBaseView 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/CommentView.m: -------------------------------------------------------------------------------- 1 | // 2 | // CommentView.m 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/25. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import "CommentView.h" 10 | 11 | @implementation CommentView 12 | 13 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 14 | return 30; 15 | } 16 | 17 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 18 | return 120.; 19 | } 20 | 21 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 22 | static NSString *cellId = @"cellId"; 23 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId]; 24 | if (!cell) { 25 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId]; 26 | } 27 | cell.textLabel.text = self.info[@"data"]; 28 | return cell; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/ItemDetailView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ItemDetailView.h 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/25. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "YXTabItemBaseView.h" 11 | 12 | @interface ItemDetailView : YXTabItemBaseView 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/ItemDetailView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ItemDetailView.m 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/25. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import "ItemDetailView.h" 10 | 11 | @implementation ItemDetailView 12 | 13 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 14 | return 30; 15 | } 16 | 17 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 18 | return 80.; 19 | } 20 | 21 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 22 | static NSString *cellId = @"cellId"; 23 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId]; 24 | if (!cell) { 25 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId]; 26 | } 27 | cell.textLabel.text = self.info[@"data"]; 28 | return cell; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/PicAndTextIntroduceView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PicAndTextIntroduceView.h 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/25. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "YXTabItemBaseView.h" 11 | 12 | @interface PicAndTextIntroduceView : YXTabItemBaseView 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/PicAndTextIntroduceView.m: -------------------------------------------------------------------------------- 1 | // 2 | // PicAndTextIntroduceView.m 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/25. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import "PicAndTextIntroduceView.h" 10 | #import "YX.h" 11 | 12 | @interface PicAndTextIntroduceView() 13 | 14 | @end 15 | 16 | @implementation PicAndTextIntroduceView 17 | 18 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 19 | return 30; 20 | } 21 | 22 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 23 | return 50.; 24 | } 25 | 26 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 27 | static NSString *cellId = @"cellId"; 28 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId]; 29 | if (!cell) { 30 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId]; 31 | } 32 | cell.textLabel.text = self.info[@"data"]; 33 | return cell; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/YX.h: -------------------------------------------------------------------------------- 1 | // 2 | // Header.h 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/29. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #ifndef Header_h 10 | #define Header_h 11 | 12 | 13 | #endif /* Header_h */ 14 | 15 | static NSString *const kGoTopNotificationName = @"goTop";//进入置顶命令 16 | static NSString *const kLeaveTopNotificationName = @"leaveTop";//离开置顶命令 17 | static CGFloat const kTopBarHeight = 60.; 18 | static CGFloat const kBottomBarHeight = 60.; 19 | static CGFloat const kTabTitleViewHeight = 45.; 20 | 21 | #define SCREEN_WIDTH [[UIScreen mainScreen] bounds].size.width 22 | #define SCREEN_HEIGHT [[UIScreen mainScreen] bounds].size.height 23 | 24 | 25 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.h 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/25. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import "YXIgnoreHeaderTouchTableView.h" 10 | 11 | @interface YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView : YXIgnoreHeaderTouchTableView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.m: -------------------------------------------------------------------------------- 1 | // 2 | // YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.m 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/25. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import "YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.h" 10 | 11 | @implementation YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView 12 | 13 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { 14 | return YES; 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/YXIgnoreHeaderTouchTableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // YXIgnoreHeaderTouchTableView.h 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/24. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * 忽略tableHeaderView点击事件,使他可以往底层传递。 13 | */ 14 | @interface YXIgnoreHeaderTouchTableView : UITableView 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/YXIgnoreHeaderTouchTableView.m: -------------------------------------------------------------------------------- 1 | // 2 | // YXIgnoreHeaderTouchTableView.m 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/24. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import "YXIgnoreHeaderTouchTableView.h" 10 | 11 | @implementation YXIgnoreHeaderTouchTableView 12 | 13 | - (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event { 14 | if (self.tableHeaderView && CGRectContainsPoint(self.tableHeaderView.frame, point)) { 15 | return NO; 16 | 17 | } 18 | return [super pointInside:point withEvent:event]; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/YXTabItemBaseView.h: -------------------------------------------------------------------------------- 1 | // 2 | // YXTabItemBaseView.h 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/29. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface YXTabItemBaseView : UIView 12 | 13 | @property (nonatomic, strong) UITableView *tableView; 14 | @property (nonatomic, assign) BOOL canScroll; 15 | @property (nonatomic, strong) NSDictionary *info; 16 | 17 | -(void)renderUIWithInfo:(NSDictionary *)info; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/YXTabItemBaseView.m: -------------------------------------------------------------------------------- 1 | // 2 | // YXTabItemBaseView.m 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/29. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import "YXTabItemBaseView.h" 10 | #import "YX.h" 11 | 12 | @implementation YXTabItemBaseView 13 | 14 | -(void)renderUIWithInfo:(NSDictionary *)info{ 15 | self.info = info; 16 | NSNumber *position = info[@"position"]; 17 | int num = [position intValue]; 18 | 19 | self.frame = CGRectMake(num*SCREEN_WIDTH, 0, SCREEN_WIDTH, SCREEN_HEIGHT-kTopBarHeight-kBottomBarHeight-kTabTitleViewHeight); 20 | self.tableView = [[UITableView alloc] initWithFrame:self.bounds]; 21 | self.tableView.dataSource = self; 22 | self.tableView.delegate = self; 23 | //_tableView.scrollEnabled = NO; 24 | [self addSubview:self.tableView]; 25 | 26 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(acceptMsg:) name:kGoTopNotificationName object:nil]; 27 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(acceptMsg:) name:kLeaveTopNotificationName object:nil];//其中一个TAB离开顶部的时候,如果其他几个偏移量不为0的时候,要把他们都置为0 28 | } 29 | 30 | -(void)acceptMsg : (NSNotification *)notification{ 31 | //NSLog(@"%@",notification); 32 | NSString *notificationName = notification.name; 33 | if ([notificationName isEqualToString:kGoTopNotificationName]) { 34 | NSDictionary *userInfo = notification.userInfo; 35 | NSString *canScroll = userInfo[@"canScroll"]; 36 | if ([canScroll isEqualToString:@"1"]) { 37 | self.canScroll = YES; 38 | self.tableView.showsVerticalScrollIndicator = YES; 39 | } 40 | }else if([notificationName isEqualToString:kLeaveTopNotificationName]){ 41 | self.tableView.contentOffset = CGPointZero; 42 | self.canScroll = NO; 43 | self.tableView.showsVerticalScrollIndicator = NO; 44 | } 45 | } 46 | 47 | -(void)dealloc{ 48 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 49 | } 50 | 51 | 52 | 53 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 54 | return 0; 55 | } 56 | 57 | 58 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 59 | return nil; 60 | } 61 | 62 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView{ 63 | if (!self.canScroll) { 64 | [scrollView setContentOffset:CGPointZero]; 65 | } 66 | CGFloat offsetY = scrollView.contentOffset.y; 67 | if (offsetY<0) { 68 | [[NSNotificationCenter defaultCenter] postNotificationName:kLeaveTopNotificationName object:nil userInfo:@{@"canScroll":@"1"}]; 69 | } 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/YXTabTitleView.h: -------------------------------------------------------------------------------- 1 | // 2 | // YXTabTitleView.h 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/25. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface YXTabTitleView : UIView 12 | 13 | -(instancetype)initWithTitleArray:(NSArray *)titleArray; 14 | 15 | -(void)setItemSelected: (NSInteger)column; 16 | 17 | /** 18 | * 定义点击的block 19 | * 20 | * @param NSInteger 点击column数 21 | */ 22 | typedef void (^YXTabTitleClickBlock)(NSInteger); 23 | 24 | @property (nonatomic, strong) YXTabTitleClickBlock titleClickBlock; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/YXTabTitleView.m: -------------------------------------------------------------------------------- 1 | // 2 | // YXTabTitleView.m 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/25. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import "YXTabTitleView.h" 10 | #import "YX.h" 11 | 12 | @interface YXTabTitleView() 13 | 14 | @property (nonatomic, strong) NSArray *titleArray; 15 | @property (nonatomic, strong) NSMutableArray *titleBtnArray; 16 | @property (nonatomic, strong) UIView *indicateLine; 17 | 18 | @end 19 | 20 | @implementation YXTabTitleView 21 | 22 | -(instancetype)initWithTitleArray:(NSArray *)titleArray{ 23 | self = [super initWithFrame:CGRectZero]; 24 | if (self) { 25 | _titleArray = titleArray; 26 | _titleBtnArray = [NSMutableArray array]; 27 | 28 | self.frame = CGRectMake(0, 0, SCREEN_WIDTH, kTabTitleViewHeight); 29 | CGFloat btnWidth = SCREEN_WIDTH/titleArray.count; 30 | 31 | for (int i=0; i 10 | 11 | @interface YXTabView : UIView 12 | 13 | /* 14 | @[@{ 15 | @"title":@"图文介绍", 16 | @"view":@"PicAndTextIntroduceView", 17 | @"data":@"图文介绍的数据", 18 | @"position":@0 19 | },@{ 20 | @"title":@"商品详情", 21 | @"view":@"ItemDetailView", 22 | @"data":@"商品详情的数据", 23 | @"position":@1 24 | },@{ 25 | @"title":@"评价(273)", 26 | @"view":@"CommentView", 27 | @"data":@"评价的数据", 28 | @"position":@2 29 | }]; 30 | */ 31 | -(instancetype)initWithTabConfigArray:(NSArray *)tabConfigArray;//tab页配置数组 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/View/YXTabView.m: -------------------------------------------------------------------------------- 1 | // 2 | // YXTabView.m 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/25. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import "YXTabView.h" 10 | #import "YXTabTitleView.h" 11 | #import "YXTabItemBaseView.h" 12 | #import "YX.h" 13 | 14 | @interface YXTabView() 15 | 16 | @property (nonatomic, strong) YXTabTitleView *tabTitleView; 17 | @property (nonatomic, strong) UIScrollView *tabContentView; 18 | 19 | @end 20 | 21 | @implementation YXTabView 22 | 23 | -(instancetype)initWithTabConfigArray:(NSArray *)tabConfigArray{ 24 | self = [super initWithFrame:CGRectZero]; 25 | if (self) { 26 | self.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-kBottomBarHeight-kTopBarHeight); 27 | 28 | NSMutableArray *titleArray = [NSMutableArray array]; 29 | for (int i=0; i 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/23. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView.h" 11 | #import "YXTabView.h" 12 | #import "YX.h" 13 | 14 | 15 | @interface ViewController () 16 | 17 | @property (nonatomic, strong) YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView *tableView; 18 | 19 | @property (nonatomic, assign) BOOL isTopIsCanNotMoveTabView; 20 | 21 | @property (nonatomic, assign) BOOL isTopIsCanNotMoveTabViewPre; 22 | 23 | @property (nonatomic, assign) BOOL canScroll; 24 | 25 | @end 26 | 27 | @implementation ViewController 28 | 29 | - (void)viewDidLoad { 30 | [super viewDidLoad]; 31 | 32 | [self initUI]; 33 | 34 | } 35 | 36 | -(void)initUI{ 37 | [self initPicView]; 38 | _tableView = [[YXIgnoreHeaderTouchAndRecognizeSimultaneousTableView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.frame), CGRectGetHeight(self.view.frame)-kBottomBarHeight) style:UITableViewStylePlain]; 39 | _tableView.backgroundColor = [UIColor clearColor]; 40 | _tableView.delegate = self; 41 | _tableView.dataSource = self; 42 | _tableView.showsVerticalScrollIndicator = NO; 43 | [self.view addSubview:_tableView]; 44 | 45 | UIView *headView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.frame), 250)]; 46 | headView.backgroundColor = [UIColor clearColor]; 47 | _tableView.tableHeaderView = headView; 48 | 49 | [self initTopView]; 50 | [self initBottomView]; 51 | 52 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(acceptMsg:) name:kLeaveTopNotificationName object:nil]; 53 | } 54 | 55 | -(void)acceptMsg : (NSNotification *)notification{ 56 | //NSLog(@"%@",notification); 57 | NSDictionary *userInfo = notification.userInfo; 58 | NSString *canScroll = userInfo[@"canScroll"]; 59 | if ([canScroll isEqualToString:@"1"]) { 60 | _canScroll = YES; 61 | } 62 | } 63 | 64 | -(void)dealloc{ 65 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 66 | } 67 | 68 | -(void)initPicView{ 69 | UIImageView *picView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.frame), CGRectGetWidth(self.view.frame))]; 70 | picView.image = [UIImage imageNamed:@"item.jpg"]; 71 | picView.userInteractionEnabled = YES; 72 | UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(clickImage:)]; 73 | [picView addGestureRecognizer:tapGesture]; 74 | [self.view addSubview:picView]; 75 | } 76 | 77 | -(void)clickImage:(UITapGestureRecognizer *)gesture{ 78 | NSLog(@"点击图片操作"); 79 | } 80 | 81 | -(void)initTopView{ 82 | UIView *topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.frame), kTopBarHeight)]; 83 | topView.backgroundColor = [UIColor orangeColor]; 84 | UILabel *textLabel = [[UILabel alloc] initWithFrame:topView.bounds]; 85 | textLabel.text = @"顶部BAR"; 86 | textLabel.textAlignment = NSTextAlignmentCenter; 87 | [topView addSubview:textLabel]; 88 | [self.view addSubview:topView]; 89 | } 90 | 91 | -(void)initBottomView{ 92 | UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, CGRectGetHeight(self.view.frame)-kBottomBarHeight, CGRectGetWidth(self.view.frame), kBottomBarHeight)]; 93 | bottomView.backgroundColor = [UIColor orangeColor]; 94 | UILabel *textLabel = [[UILabel alloc] initWithFrame:bottomView.bounds]; 95 | textLabel.text = @"底部BAR"; 96 | textLabel.textAlignment = NSTextAlignmentCenter; 97 | [bottomView addSubview:textLabel]; 98 | [self.view addSubview:bottomView]; 99 | } 100 | 101 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ 102 | return 3; 103 | } 104 | 105 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 106 | return 1; 107 | } 108 | 109 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 110 | NSInteger section = indexPath.section; 111 | CGFloat height = 0.; 112 | if (section==0) { 113 | height = 160.; 114 | }else if(section==1){ 115 | height = 60.; 116 | }else if(section==2){ 117 | height = CGRectGetHeight(self.view.frame)-kBottomBarHeight-kTopBarHeight; 118 | } 119 | return height; 120 | } 121 | 122 | 123 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 124 | 125 | UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; 126 | cell.selectionStyle = UITableViewCellSelectionStyleNone; 127 | NSInteger section = indexPath.section; 128 | 129 | if (section==0) { 130 | UILabel *textlabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 40, CGRectGetWidth(self.view.frame), 20)]; 131 | [cell.contentView addSubview:textlabel]; 132 | textlabel.text = @"价格区"; 133 | textlabel.textAlignment = NSTextAlignmentCenter; 134 | }else if(section==1){ 135 | UILabel *textlabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 10, CGRectGetWidth(self.view.frame), 20)]; 136 | [cell.contentView addSubview:textlabel]; 137 | textlabel.text = @"sku区"; 138 | textlabel.textAlignment = NSTextAlignmentCenter; 139 | }else if(section==2){ 140 | NSArray *tabConfigArray = @[@{ 141 | @"title":@"图文介绍", 142 | @"view":@"PicAndTextIntroduceView", 143 | @"data":@"图文介绍的数据", 144 | @"position":@0 145 | },@{ 146 | @"title":@"商品详情", 147 | @"view":@"ItemDetailView", 148 | @"data":@"商品详情的数据", 149 | @"position":@1 150 | },@{ 151 | @"title":@"评价(273)", 152 | @"view":@"CommentView", 153 | @"data":@"评价的数据", 154 | @"position":@2 155 | }]; 156 | YXTabView *tabView = [[YXTabView alloc] initWithTabConfigArray:tabConfigArray]; 157 | [cell.contentView addSubview:tabView]; 158 | } 159 | return cell; 160 | } 161 | 162 | -(void)scrollViewDidScroll:(UIScrollView *)scrollView{ 163 | CGFloat tabOffsetY = [_tableView rectForSection:2].origin.y-kTopBarHeight; 164 | CGFloat offsetY = scrollView.contentOffset.y; 165 | _isTopIsCanNotMoveTabViewPre = _isTopIsCanNotMoveTabView; 166 | if (offsetY>=tabOffsetY) { 167 | scrollView.contentOffset = CGPointMake(0, tabOffsetY); 168 | _isTopIsCanNotMoveTabView = YES; 169 | }else{ 170 | _isTopIsCanNotMoveTabView = NO; 171 | } 172 | if (_isTopIsCanNotMoveTabView != _isTopIsCanNotMoveTabViewPre) { 173 | if (!_isTopIsCanNotMoveTabViewPre && _isTopIsCanNotMoveTabView) { 174 | //NSLog(@"滑动到顶端"); 175 | [[NSNotificationCenter defaultCenter] postNotificationName:kGoTopNotificationName object:nil userInfo:@{@"canScroll":@"1"}]; 176 | _canScroll = NO; 177 | } 178 | if(_isTopIsCanNotMoveTabViewPre && !_isTopIsCanNotMoveTabView){ 179 | //NSLog(@"离开顶端"); 180 | if (!_canScroll) { 181 | scrollView.contentOffset = CGPointMake(0, tabOffsetY); 182 | } 183 | } 184 | } 185 | } 186 | 187 | @end 188 | -------------------------------------------------------------------------------- /仿造淘宝商品详情页/仿造淘宝商品详情页/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // 仿造淘宝商品详情页 4 | // 5 | // Created by yixiang on 16/3/23. 6 | // Copyright © 2016年 yixiang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | --------------------------------------------------------------------------------