码迷,mamicode.com
首页 > 其他好文 > 详细

天猫首页UI层次与类设计分析

时间:2016-04-01 06:30:11      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:

  电商APP的首页设计和实现,直接关系到对用户跳出率与最后的购买转换率。使用过天猫iPhone客户端的童鞋,一定能感受到其良好的用户体验和交互流畅。作为电商行业的佼佼者,以及具有移动端开发多年的沉淀,天猫在首页的UI层次与类设计是怎样的呢,笔者使用越狱iPad、ida、Reveal、dumpdecrypted、class-dump等工具对该页面作了分析,给出主要的头文件以及一些Reveal截图,供大家参考。

一、逆向文件整理

  其中Tmall4iPhone.app为未脱壳前的文件,但可以从里面的文件看出,其对各资源文件有良好的命名,以及用到了多个阿里组件SDK;Tmall4iPhone.h为app所有的头文件;FrontPage_all.h为首页相关的头文件;FrontPage_main.h为首页重要的几个头文件,也将在本文第四节中给出。在截图中呈现的大部分为自定义View类,头文件可以在Tmall4iPhone.h中搜索,了解其定义声明。

技术分享  

  https://github.com/1962449521/TmallFrontPage_Crack

 

二、由头文件及Reveal UI层次得出的猜想

  1. 内容容器并非直观认为的TableView,而是使用了ScrollView,但几乎实现了与tableView相同的数据源、重用机制等特点。
  2. 数据分段加载,总数据分成多段批次向服务器请示,ScrollView的contentSize随逐次数据请求而递增。
  3. 每批次获取数据后,生成各个小节的数据实例及UI实例,将UI加入到ScrollView。
  4. 各小节的数据实例由canResue属性决定是否能做内存重用。
  5. 首页有隐藏的WebView以处理线上Bug,配合大促实时维护,或做一些类似红包雨、弹幕墙的活动。

 

三、 Reveal UI分析

  1. 容器组成分析

  * 由UITabBar可以了解到多Tab App常用的TabBarController.
  * FrontPageTopBar为页头的扫描、搜索消息等。页面滑至顶部时背景透明,滑离顶部时背景为红色。非第一次使用App, 页面DidAppear时,页面会自动滑动到中间的推荐部位。
  * 有隐藏的PopLayer,内含hybrid的webView,猜测用于大促时的动态监控与实时修复,或是红包雨、弹幕墙等活动。
技术分享
  2. 一些小控件
技术分享
  3.主要内容容器TMFrontPageLazyScrollView
技术分享
技术分享
技术分享
技术分享
技术分享
技术分享
 

  3. 剩余部分主要是目录树或者穿插其中的静态广告栏

技术分享

技术分享

 

四、较为关键的头文件:首页视图控制器ViewController、内容容器ScrollView、单项内容数据模型与ViewModel

  1.首页视图控制器ViewController

  1 @interface FrontPageController : TMViewController <TMFrontPageElementEventDelegate, TMFrontPageLayoutDelegate, TMFrontPageLayoutScrollDelegate, TMFrontPageLayoutDataSource, TMFrontPageLayoutPageScrollDelegate, TMMuiScrollViewDelegate, TMMuiLazyScrollViewDataSource, TMMuiNoResultViewDelegate, FlashManagerDelegate, UITextFieldDelegate, UIToolbarDelegate> {
  2     BOOL _loading;
  3     BOOL _loadingMore;
  4     BOOL _canBeRecycled;
  5     BOOL _fromCache;
  6     BOOL _hasMoreData;
  7     BOOL _autoShowSuperBrandMask;
  8     BOOL _moreRecommendNumSaved;
  9     BOOL _trackingPerformance;
 10     BOOL _clearCache;
 11     BOOL _mainVenueShoudShow;
 12     BOOL _popLayerShow;
 13     BOOL _isBack;
 14     BOOL _seaviewHasNoMore;
 15     BOOL _elevatorShow;
 16     BOOL _isNewExposure;
 17     BOOL _isSaleExposure;
 18     BOOL _isHotExposure;
 19     BOOL _goodShopShow;
 20     BOOL _recommendHallShow;
 21     BOOL _recommendVVipShow;
 22     BOOL _isNotFirstLoad;
 23     NSArray* _dataSource;
 24     NSMutableDictionary* _layoutModelDict;
 25     NSMutableDictionary* _layoutDict;
 26     NSMutableArray* _layoutArray;
 27     TMFrontPageLazyScrollView* _contentView;
 28     SearchBoxButton* _searchBoxBtn;
 29     NSString* _currentLayout;
 30     NSMutableDictionary* _showedAlgIdDict;
 31     AirTrack* _tester;
 32     NSString* _pageName;
 33     NSString* _currentUserId;
 34     NSString* _bucketNumber;
 35     NSMutableDictionary* _taobaoNeededShowedParams;
 36     TMMuiMsgBadgeButton* _messageButton;
 37     TMFrontPageRequest* _staticDataRequest;
 38     TMFrontPageMoreRecommendRequest* _moreRecommendRequest;
 39     TMFrontPageGoodShopRequest* _goodShopRequest;
 40     TMFrontPageLayout* _moreDataLayout;
 41     NSDate* _lastUpdateDate;
 42     NSMutableDictionary* _elementDict;
 43     TMMuiNoResultView* _errorTips;
 44     FrontPageTopBar* _topBar;
 45     FrontPageTopTips* _frontPageTopTips;
 46     FrontPageBottomTips* _frontPageBottomTips;
 47     UIImageView* _flashView;
 48     TMMuiButton* _returnToTopBtn;
 49     TMFrontPageElement* _superAView;
 50     TMFrontPageElementModel* _superAModel;
 51     TMFrontPageLayout* _superALayout;
 52     NSDictionary* _flashInfo;
 53     NSMutableArray* _uploadedKeyword;
 54     NSDictionary* _toUploadMoreRecommendParams;
 55     UITextField* _dateField;
 56     TMFrontPageTimePickerView* _timePicker;
 57     UIToolbar* _timePickerBar;
 58     int _recommendPageCount;
 59     NSMutableArray* _showedLayouts;
 60     UIControl* _blockControl;
 61     UIView* _mainVenueView;
 62     float _mainVenueBottom;
 63     NSString* _shakeUrl;
 64     NSString* _shakeTitle;
 65     NSMutableArray* _seaviewRooms;
 66     NSMutableArray* _seaviewKeyFrames;
 67     ElevatorView* _elevatorView;
 68     NSString* _topBarChangeColor;
 69     NSMutableArray* _popLayerTimerRemindArray;
 70     NSString* _popLayerTimerTipText;
 71     NSDictionary* _mainVenue;
 72     NSString* _jumpParam;
 73     double _lastContentY;
 74     double _topBarChangeStartTime;
 75     double _topBarChangeEndTime;
 76 }
 77 @property(readonly, copy) NSString* debugDescription;
 78 @property(readonly, copy) NSString* description;
 79 @property(readonly, assign) Class superclass;
 80 @property(readonly, assign) unsigned hash;
 81 @property(retain, nonatomic) NSString* jumpParam;
 82 @property(assign, nonatomic) BOOL isNotFirstLoad;
 83 @property(retain, nonatomic) NSDictionary* mainVenue;
 84 @property(retain, nonatomic) NSString* popLayerTimerTipText;
 85 @property(retain, nonatomic) NSMutableArray* popLayerTimerRemindArray;
 86 @property(retain, nonatomic) NSString* topBarChangeColor;
 87 @property(assign, nonatomic) double topBarChangeEndTime;
 88 @property(assign, nonatomic) double topBarChangeStartTime;
 89 @property(assign, nonatomic) BOOL recommendVVipShow;
 90 @property(assign, nonatomic) BOOL recommendHallShow;
 91 @property(assign, nonatomic) BOOL goodShopShow;
 92 @property(assign, nonatomic) BOOL isHotExposure;
 93 @property(assign, nonatomic) BOOL isSaleExposure;
 94 @property(assign, nonatomic) BOOL isNewExposure;
 95 @property(assign, nonatomic) BOOL elevatorShow;
 96 @property(assign, nonatomic) BOOL seaviewHasNoMore;
 97 @property(retain, nonatomic) ElevatorView* elevatorView;
 98 @property(retain, nonatomic) NSMutableArray* seaviewKeyFrames;
 99 @property(retain, nonatomic) NSMutableArray* seaviewRooms;
100 @property(assign, nonatomic) BOOL isBack;
101 @property(copy, nonatomic) NSString* shakeTitle;
102 @property(copy, nonatomic) NSString* shakeUrl;
103 @property(assign, nonatomic) BOOL popLayerShow;
104 @property(assign, nonatomic) float mainVenueBottom;
105 @property(retain, nonatomic) UIView* mainVenueView;
106 @property(assign, nonatomic) BOOL mainVenueShoudShow;
107 @property(retain, nonatomic) UIControl* blockControl;
108 @property(assign, nonatomic) BOOL clearCache;
109 @property(retain, nonatomic) NSMutableArray* showedLayouts;
110 @property(assign, nonatomic) int recommendPageCount;
111 @property(assign, nonatomic, getter=isTrackingPerformance) BOOL trackingPerformance;
112 @property(retain, nonatomic) UIToolbar* timePickerBar;
113 @property(retain, nonatomic) TMFrontPageTimePickerView* timePicker;
114 @property(retain, nonatomic) UITextField* dateField;
115 @property(retain, nonatomic) NSDictionary* toUploadMoreRecommendParams;
116 @property(assign, nonatomic) BOOL moreRecommendNumSaved;
117 @property(retain, nonatomic) NSMutableArray* uploadedKeyword;
118 @property(retain, nonatomic) NSDictionary* flashInfo;
119 @property(retain, nonatomic) TMFrontPageLayout* superALayout;
120 @property(retain, nonatomic) TMFrontPageElementModel* superAModel;
121 @property(retain, nonatomic) TMFrontPageElement* superAView;
122 @property(retain, nonatomic) TMMuiButton* returnToTopBtn;
123 @property(assign, nonatomic) double lastContentY;
124 @property(assign, nonatomic) BOOL autoShowSuperBrandMask;
125 @property(retain, nonatomic) UIImageView* flashView;
126 @property(retain, nonatomic) FrontPageBottomTips* frontPageBottomTips;
127 @property(retain, nonatomic) FrontPageTopTips* frontPageTopTips;
128 @property(retain, nonatomic) FrontPageTopBar* topBar;
129 @property(retain, nonatomic) TMMuiNoResultView* errorTips;
130 @property(retain, nonatomic) NSMutableDictionary* elementDict;
131 @property(retain, nonatomic) NSDate* lastUpdateDate;
132 @property(retain, nonatomic) TMFrontPageLayout* moreDataLayout;
133 @property(assign, nonatomic) BOOL hasMoreData;
134 @property(retain, nonatomic) TMFrontPageGoodShopRequest* goodShopRequest;
135 @property(retain, nonatomic) TMFrontPageMoreRecommendRequest* moreRecommendRequest;
136 @property(retain, nonatomic) TMFrontPageRequest* staticDataRequest;
137 @property(assign, nonatomic) __weak TMMuiMsgBadgeButton* messageButton;
138 @property(retain, nonatomic) NSMutableDictionary* taobaoNeededShowedParams;
139 @property(assign) BOOL fromCache;
140 @property(assign) BOOL canBeRecycled;
141 @property(retain, nonatomic) NSString* bucketNumber;
142 @property(retain, nonatomic) NSString* currentUserId;
143 @property(retain, nonatomic) NSString* pageName;
144 @property(retain, nonatomic) AirTrack* tester;
145 @property(retain, nonatomic) NSMutableDictionary* showedAlgIdDict;
146 @property(assign, nonatomic, getter=isLoadingMore) BOOL loadingMore;
147 @property(assign, nonatomic, getter=isLoading) BOOL loading;
148 @property(retain, nonatomic) NSString* currentLayout;
149 @property(retain, nonatomic) SearchBoxButton* searchBoxBtn;
150 @property(retain, nonatomic) TMFrontPageLazyScrollView* contentView;
151 @property(retain, nonatomic) NSMutableArray* layoutArray;
152 @property(retain, nonatomic) NSMutableDictionary* layoutDict;
153 @property(retain, nonatomic) NSMutableDictionary* layoutModelDict;
154 @property(retain, nonatomic) NSArray* dataSource;
155 -(void).cxx_destruct;
156 -(void)removeBlockControlAndResignDateField;
157 -(void)textFieldDidBeginEditing:(id)textField;
158 -(void)tabBarReclick:(id)reclick;
159 -(void)clickOKButton;
160 -(void)clickClearButton;
161 -(void)clickCancleButton;
162 -(BOOL)useShakeForMiaoshaBaitItems;
163 -(void)dealloc;
164 -(void)didReceiveMemoryWarning;
165 -(void)viewDidDisappear:(BOOL)view;
166 -(void)setRewritedActionURL:(id)url;
167 -(void)viewDidAppear:(BOOL)view;
168 -(void)viewWillDisappear:(BOOL)view;
169 -(void)viewWillAppear:(BOOL)view;
170 -(void)viewDidLoad;
171 -(void)loadView;
172 -(id)init;
173 -(void)frontPageConfigUpdate;
174 -(void)popLayerUpdate;
175 -(void)mainVenueCheck;
176 -(void)returnToTopBtnShow;
177 -(void)elevatorViewShowWithOffsetY;
178 -(void)makeFrontPageStyleNavigationBar;
179 -(void)handleThemeUpdate;
180 -(void)handleThemeUpdateNotification:(id)notification;
181 -(void)resetContent;
182 -(void)calculateLayoutFrame:(id)frame;
183 -(void)layoutContentWithLayoutCalculate:(BOOL)layoutCalculate;
184 -(void)reLayoutContent;
185 -(void)initNavigationItem;
186 -(void)initContentFromCache:(BOOL)cache;
187 -(void)initSearchBox;
188 -(id)historyCeleBrandIds;
189 -(void)saveHistoryCeleBrandIdForModel:(id)model;
190 -(id)historyBrandIDs;
191 -(void)saveHistoryBrandIdForModel:(id)model;
192 -(void)saveMoreRecommendVisibleNum;
193 -(int)moreRecommendVisibleNum;
194 -(id)historyItemIDs;
195 -(void)appendLayout:(id)layout;
196 -(void)loadData;
197 -(void)loadMore;
198 -(id)UTPageName;
199 -(void)cleanViewController;
200 -(void)refreshMessageCount;
201 -(void)appendElementModels:(id)models models:(id)models2;
202 -(void)buildAllElementModels;
203 -(void)postLayoutDoneNotification;
204 -(void)uploadMoreRecommendShowWithParams:(id)params;
205 -(void)enterForeground;
206 -(void)stopPullAnimation;
207 -(void)buildDateField;
208 -(void)endTrackRenderPerformance;
209 -(void)renderWithDataString:(id)dataString fromCache:(BOOL)cache;
210 -(void)renderWithDataFromCache:(BOOL)cache;
211 -(void)updateModuleShowedStatusForLayout:(id)layout;
212 -(void)mainViewHidden:(BOOL)hidden;
213 -(void)mainVenueViewClick;
214 -(void)btnListClick:(id)click;
215 -(void)btnScanClick:(id)click;
216 -(void)btnMessageClick:(id)click;
217 -(void)btnSearchBoxClick:(id)click;
218 -(double)timeIntervalForString:(id)string;
219 -(id)customDataKey;
220 -(id)scrollView:(id)view itemByMuiID:(id)anId;
221 -(id)scrollView:(id)view rectModelAtIndex:(unsigned)index;
222 -(unsigned)numberOfItemInScrollView:(id)scrollView;
223 -(void)element:(id)element clickedWithAction:(id)action userInfo:(id)info;
224 -(void)deleteElement:(id)element;
225 -(void)pageLayoutJumpMorePage:(id)page;
226 -(void)pageLayout:(id)layout atIndex:(unsigned)index;
227 -(void)layout:(id)layout atIndex:(unsigned)index;
228 -(void)layout:(id)layout heightChanged:(BOOL)changed;
229 -(unsigned)numberOfElementsOfLayout:(id)layout;
230 -(id)elementForLayout:(id)layout byMuiID:(id)anId;
231 -(void)triggeredLoadData:(unsigned)data;
232 -(void)scrollViewDidScroll:(id)scrollView;
233 -(void)processBeforePush:(id)push withContext:(id)context;
234 -(void)didTouchDownButton:(id)button;
235 -(void)flashViewWillDisappear;
236 -(void)flashViewDidShowWithData:(id)flashView;
237 -(void)shakeDeInit;
238 -(void)shakeInit;
239 -(BOOL)_shakeCheckEnable;
240 -(double)_shakeConvertTimeinterval:(id)timeinterval;
241 -(void)_shakeDelayJump:(id)jump;
242 -(void)appActive;
243 -(void)appResign;
244 @end

 

 2.内容容器ScrollView

 1 @interface TMFrontPageLazyScrollView : TMMuiLazyScrollView {
 2 }
 3 @end
 4 
 5 @interface TMMuiLazyScrollView : XXUnknownSuperclass <UIScrollViewDelegate, NSCoding> {
 6     id<TMMuiLazyScrollViewDataSource> _dataSource;
 7     NSMutableSet* _visibleItems;
 8     UIScrollView* _outerScrollView;
 9     NSMutableDictionary* _recycledIdentifierItemsDic;
10     NSMutableArray* _itemsFrames;
11     id<TMMuiLazyScrollViewDelegate> _lazyScrollViewDelegate;
12     NSArray* _modelsSortedByTop;
13     NSArray* _modelsSortedByBottom;
14     NSMutableSet* _firstSet;
15     NSMutableSet* _secondSet;
16     NSString* _currentVisibleItemMuiID;
17     NSMutableSet* _shouldReloadItems;
18     id<UIScrollViewDelegate> _outerDelegate;
19     TMMuiLazyScrollViewObserver* _outerScrollViewObserver;
20     CGPoint _lastScrollOffset;
21 }
22 @property(readonly, copy) NSString* debugDescription;
23 @property(readonly, copy) NSString* description;
24 @property(readonly, assign) Class superclass;
25 @property(readonly, assign) unsigned hash;
26 @property(retain, nonatomic) TMMuiLazyScrollViewObserver* outerScrollViewObserver;
27 @property(assign, nonatomic) __weak id<UIScrollViewDelegate> outerDelegate;
28 @property(retain, nonatomic) NSMutableSet* shouldReloadItems;
29 @property(retain, nonatomic) NSString* currentVisibleItemMuiID;
30 @property(assign, nonatomic) CGPoint lastScrollOffset;
31 @property(retain, nonatomic) NSMutableSet* secondSet;
32 @property(retain, nonatomic) NSMutableSet* firstSet;
33 @property(retain, nonatomic) NSArray* modelsSortedByBottom;
34 @property(retain, nonatomic) NSArray* modelsSortedByTop;
35 @property(assign, nonatomic) __weak id<TMMuiLazyScrollViewDelegate> lazyScrollViewDelegate;
36 @property(retain, nonatomic) NSMutableArray* itemsFrames;
37 @property(retain, nonatomic) NSMutableDictionary* recycledIdentifierItemsDic;
38 @property(assign, nonatomic) __weak UIScrollView* outerScrollView;
39 @property(readonly, assign, nonatomic) NSMutableSet* visibleItems;
40 @property(assign, nonatomic) __weak id<TMMuiLazyScrollViewDataSource> dataSource;
41 -(void).cxx_destruct;
42 -(CGRect)originalRectConversionToAbsRect:(CGRect)absRect withModifiedViewRect:(CGRect)modifiedViewRect;
43 -(BOOL)isCellVisible:(id)visible;
44 -(id)dequeueReusableItemWithIdentifier:(id)identifier;
45 -(void)removeAllLayout;
46 -(void)reLayout;
47 -(void)reloadData;
48 -(id)recycledIdentifierSet:(id)set;
49 -(void)assembleSubviewsForReload:(BOOL)reload minY:(float)y maxY:(float)y3;
50 -(void)didMoveToSuperview;
51 -(void)assembleSubviews;
52 -(void)creatScrollViewIndex;
53 -(id)showingItemIndexSetFrom:(float)from to:(float)to;
54 -(unsigned)binarySearchForIndex:(id)index baseLine:(float)line isFromTop:(BOOL)top;
55 -(void)scrollViewDidScrollToTop:(id)scrollView;
56 -(BOOL)scrollViewShouldScrollToTop:(id)scrollView;
57 -(void)scrollViewDidEndZooming:(id)scrollView withView:(id)view atScale:(float)scale;
58 -(void)scrollViewWillBeginZooming:(id)scrollView withView:(id)view;
59 -(id)viewForZoomingInScrollView:(id)scrollView;
60 -(void)scrollViewDidEndScrollingAnimation:(id)scrollView;
61 -(void)scrollViewDidEndDecelerating:(id)scrollView;
62 -(void)scrollViewWillBeginDecelerating:(id)scrollView;
63 -(void)scrollViewDidEndDragging:(id)scrollView willDecelerate:(BOOL)decelerate;
64 -(void)scrollViewWillEndDragging:(id)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint*)offset;
65 -(void)scrollViewWillBeginDragging:(id)scrollView;
66 -(void)scrollViewDidZoom:(id)scrollView;
67 -(void)scrollViewDidScroll:(id)scrollView;
68 -(void)setDelegate:(id)delegate;
69 -(void)dealloc;
70 -(id)initWithFrame:(CGRect)frame;
71 -(void)setFrame:(CGRect)frame;
72 @end
73 
74 @interface TMMuiLazyScrollViewObserver : XXUnknownSuperclass {
75     TMMuiLazyScrollView* _lazyScrollView;
76 }
77 @property(assign, nonatomic) __weak TMMuiLazyScrollView* lazyScrollView;
78 -(void).cxx_destruct;
79 -(void)observeValueForKeyPath:(id)keyPath ofObject:(id)object change:(id)change context:(void*)context;
80 @end

 

  3. 单项内容数据模型与ViewModel

 1 @interface TMFrontPageElementModel : XXUnknownSuperclass <TMFrontPageElementCalculateHeightDelegate> {
 2     BOOL _pin;
 3     BOOL _canReuse;
 4     BOOL _noReset;
 5     BOOL _isExposure;
 6     BOOL _animFlag;
 7     NSArray* _margin;
 8     unsigned _elementIndex;
 9     NSString* _identifier;
10     NSString* _syncIds;
11     unsigned _type;
12     NSString* _bgColor;
13     NSString* _display;
14     NSString* _title;
15     NSString* _titleColor;
16     NSString* _subTitle;
17     NSString* _subTitleColor;
18     NSString* _imgUrl;
19     NSString* _action;
20     NSString* _celeBrandId;
21     NSArray* _appendVarKeys;
22     float _baseHeight;
23     NSString* _source;
24     NSDictionary* _pageParams;
25     NSString* _pageParamsString;
26     NSString* _reuseIdentifier;
27     NSString* _muiID;
28     NSDictionary* _ctrClickParam;
29     NSString* _ctrClickParamString;
30     CGRect _rect;
31     CGRect _absRect;
32     CGRect _parentRect;
33 }
34 @property(readonly, copy) NSString* debugDescription;
35 @property(readonly, copy) NSString* description;
36 @property(readonly, assign) Class superclass;
37 @property(readonly, assign) unsigned hash;
38 @property(assign, nonatomic) BOOL animFlag;
39 @property(assign, nonatomic) BOOL isExposure;
40 @property(retain, nonatomic) NSString* ctrClickParamString;
41 @property(retain, nonatomic) NSDictionary* ctrClickParam;
42 @property(assign, nonatomic) BOOL noReset;
43 @property(assign, nonatomic) BOOL canReuse;
44 @property(retain, nonatomic) NSString* muiID;
45 @property(retain, nonatomic) NSString* reuseIdentifier;
46 @property(assign, nonatomic) CGRect parentRect;
47 @property(assign, nonatomic) CGRect absRect;
48 @property(assign, nonatomic) CGRect rect;
49 @property(retain, nonatomic) NSString* pageParamsString;
50 @property(retain, nonatomic) NSDictionary* pageParams;
51 @property(retain, nonatomic) NSString* source;
52 @property(assign, nonatomic) float baseHeight;
53 @property(retain, nonatomic) NSArray* appendVarKeys;
54 @property(assign, nonatomic) BOOL pin;
55 @property(retain, nonatomic) NSString* celeBrandId;
56 @property(retain, nonatomic) NSString* action;
57 @property(retain, nonatomic) NSString* imgUrl;
58 @property(retain, nonatomic) NSString* subTitleColor;
59 @property(retain, nonatomic) NSString* subTitle;
60 @property(retain, nonatomic) NSString* titleColor;
61 @property(retain, nonatomic) NSString* title;
62 @property(retain, nonatomic) NSArray* margin;
63 @property(retain, nonatomic) NSString* display;
64 @property(retain, nonatomic) NSString* bgColor;
65 @property(assign, nonatomic) unsigned type;
66 @property(retain, nonatomic) NSString* syncIds;
67 @property(retain, nonatomic) NSString* identifier;
68 @property(assign, nonatomic) unsigned elementIndex;
69 -(void).cxx_destruct;
70 -(void)right:(float)right FromModel:(id)model;
71 -(void)left:(float)left FromModel:(id)model;
72 -(void)bottom:(float)bottom FromModel:(id)model;
73 -(void)top:(float)top FromModel:(id)model;
74 -(void)rightInContainer:(float)container shouldResize:(BOOL)resize;
75 -(void)leftInContainer:(float)container shouldResize:(BOOL)resize;
76 -(void)bottomInContainer:(float)container shouldResize:(BOOL)resize;
77 -(void)topInContainer:(float)container shouldResize:(BOOL)resize;
78 -(float)marginLeft;
79 -(float)marginBottom;
80 -(float)marginRight;
81 -(float)marginTop;
82 -(void)calculateHeight;
83 -(id)initWithDictionary:(id)dictionary;
84 @end

 

 1 @interface TMFrontPageLayoutModel : XXUnknownSuperclass {
 2     NSArray* _margin;
 3     NSString* _identifier;
 4     unsigned _type;
 5     NSString* _bgColor;
 6     NSString* _loadApi;
 7     unsigned _keyIndex;
 8     NSArray* _items;
 9     NSString* _algId;
10     NSDictionary* _ctrClickParam;
11     NSArray* _ctrClickParamArray;
12     NSString* _ctrClickName;
13     NSArray* _cols;
14     NSString* _forLabel;
15 }
16 @property(retain, nonatomic) NSString* forLabel;
17 @property(retain, nonatomic) NSArray* cols;
18 @property(retain, nonatomic) NSString* ctrClickName;
19 @property(retain, nonatomic) NSArray* ctrClickParamArray;
20 @property(retain, nonatomic) NSDictionary* ctrClickParam;
21 @property(retain, nonatomic) NSString* algId;
22 @property(retain, nonatomic) NSArray* items;
23 @property(assign, nonatomic) unsigned keyIndex;
24 @property(retain, nonatomic) NSArray* margin;
25 @property(retain, nonatomic) NSString* loadApi;
26 @property(retain, nonatomic) NSString* bgColor;
27 @property(assign, nonatomic) unsigned type;
28 @property(retain, nonatomic) NSString* identifier;
29 -(void).cxx_destruct;
30 -(unsigned)numberOfColumns;
31 -(float)marginLeft;
32 -(float)marginBottom;
33 -(float)marginRight;
34 -(float)marginTop;
35 -(CGRect)originalRectConversionToAbsRect:(CGRect)absRect withModifiedViewRect:(CGRect)modifiedViewRect;
36 -(id)initWithDictionary:(id)dictionary;
37 @end

 

天猫首页UI层次与类设计分析

标签:

原文地址:http://www.cnblogs.com/hushuai-ios/p/5313932.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!