Clean up delegate

This commit is contained in:
Roman Efimov
2013-07-15 12:09:43 -05:00
parent 9dde0a5f61
commit 5fbc308f76
2 changed files with 3 additions and 12 deletions

View File

@@ -79,7 +79,7 @@ NSUInteger REDeviceSystemMajorVersion();
@param delegate The delegate (RETableViewManagerDelegate) object for the table view manager.
@return The pointer to the instance, or nil if initialization failed.
*/
- (id)initWithTableView:(UITableView *)tableView delegate:(id<RETableViewManagerDelegate>)delegate;
- (id)initWithTableView:(UITableView *)tableView delegate:(id<RETableViewManagerDelegate, UITableViewDelegate>)delegate;
/**
Initialize a table view manager object for a specific `UITableView`.
@@ -96,7 +96,7 @@ NSUInteger REDeviceSystemMajorVersion();
/**
The object that acts as the delegate of the receiving table view.
*/
@property (assign, readwrite, nonatomic) id<RETableViewManagerDelegate> delegate;
@property (assign, readwrite, nonatomic) id<RETableViewManagerDelegate, UITableViewDelegate> delegate;
///-----------------------------
/// @name Managing Custom Cells
@@ -335,9 +335,6 @@ NSUInteger REDeviceSystemMajorVersion();
- (void)tableView:(UITableView *)tableView styleCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath;
- (void)tableView:(UITableView *)tableView cellWillLayoutSubviews:(UITableViewCell *)cell;
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath item:(id)items;
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath;
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath item:(id)items;
@end

View File

@@ -51,7 +51,7 @@ NSUInteger REDeviceSystemMajorVersion() {
return self;
}
- (id)initWithTableView:(UITableView *)tableView delegate:(id<RETableViewManagerDelegate>)delegate
- (id)initWithTableView:(UITableView *)tableView delegate:(id<RETableViewManagerDelegate, UITableViewDelegate>)delegate
{
self = [self init];
if (!self)
@@ -309,9 +309,6 @@ NSUInteger REDeviceSystemMajorVersion() {
if ([_delegate respondsToSelector:@selector(tableView:didSelectRowAtIndexPath:)])
[_delegate tableView:tableView didSelectRowAtIndexPath:indexPath];
if ([_delegate respondsToSelector:@selector(tableView:didSelectRowAtIndexPath:item:)])
[_delegate tableView:tableView didSelectRowAtIndexPath:indexPath item:item];
}
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
@@ -326,9 +323,6 @@ NSUInteger REDeviceSystemMajorVersion() {
if ([_delegate respondsToSelector:@selector(tableView:accessoryButtonTappedForRowWithIndexPath:)])
[_delegate tableView:tableView accessoryButtonTappedForRowWithIndexPath:indexPath];
if ([_delegate respondsToSelector:@selector(tableView:accessoryButtonTappedForRowWithIndexPath:item:)])
[_delegate tableView:tableView accessoryButtonTappedForRowWithIndexPath:indexPath item:item];
}
- (void)tableView:(UITableView *)tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath*)indexPath