|
Nimbus
0.9.3 - Nimbus is proudly hosted on Github
An iOS framework whose growth is bounded by O(documentation).
|
00001 // 00002 // Copyright 2011 Jeff Verkoeyen 00003 // 00004 // Licensed under the Apache License, Version 2.0 (the "License"); 00005 // you may not use this file except in compliance with the License. 00006 // You may obtain a copy of the License at 00007 // 00008 // http://www.apache.org/licenses/LICENSE-2.0 00009 // 00010 // Unless required by applicable law or agreed to in writing, software 00011 // distributed under the License is distributed on an "AS IS" BASIS, 00012 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 // See the License for the specific language governing permissions and 00014 // limitations under the License. 00015 // 00016 00017 #import <Foundation/Foundation.h> 00018 #import <UIKit/UIKit.h> 00019 00020 #import "NITableViewModel.h" 00021 00043 @interface NICellFactory : NSObject <NITableViewModelDelegate> 00044 00077 + (UITableViewCell *)tableViewModel: (NITableViewModel *)tableViewModel 00078 cellForTableView: (UITableView *)tableView 00079 atIndexPath: (NSIndexPath *)indexPath 00080 withObject: (id)object; 00081 00089 - (void)mapObjectClass:(Class)objectClass toCellClass:(Class)cellClass; 00090 00091 @end 00092 00098 @protocol NICellObject <NSObject> 00099 @required 00101 - (Class)cellClass; 00102 00103 @optional 00105 - (UITableViewCellStyle)cellStyle; 00106 @end 00107 00116 @protocol NICell <NSObject> 00117 @required 00123 - (BOOL)shouldUpdateCellWithObject:(id)object; 00124 00125 @optional 00142 + (CGFloat)heightForObject:(id)object atIndexPath:(NSIndexPath *)indexPath tableView:(UITableView *)tableView; 00143 @end 00144 00159 @interface NICellObject : NSObject <NICellObject> 00160 00161 // Designated initializer. 00162 - (id)initWithCellClass:(Class)cellClass userInfo:(id)userInfo; 00163 - (id)initWithCellClass:(Class)cellClass; 00164 00165 + (id)objectWithCellClass:(Class)cellClass userInfo:(id)userInfo; 00166 + (id)objectWithCellClass:(Class)cellClass; 00167 00168 @property (nonatomic, readonly, retain) id userInfo; 00169 00170 @end 00171