Skip to content

Tayphoon/CrutchKit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use CDProxy

#import <UIViewController+CDObserver.h>

@implementation TableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self cd_startObserveProtocol:@protocol(TableViewCellDelegate)];
}

- (void)didSwitch:(id)sender {

}

@end
#import "UIResponder+CDProxying.h"

@interface TableViewCell ()

@property (weak, nonatomic) id<TableViewCellDelegate> actionProxy;

@end

@implementation TableViewCell

- (void)didMoveToSuperview {
    [super didMoveToSuperview];
    self.actionProxy = (id<TableViewCellDelegate>)[self cd_proxyForProtocol:@protocol(TableViewCellDelegate)];
}

- (IBAction)switchAction:(id)sender {
    
    [self.actionProxy didSwitch:sender];
    
}

@end

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 96.9%
  • Ruby 3.1%