mirror of
https://github.com/wu736139669/ManagerDemo.git
synced 2026-08-05 05:55:42 +00:00
59 lines
1.1 KiB
Objective-C
59 lines
1.1 KiB
Objective-C
//
|
|
// DTAccessibilityViewProxy.m
|
|
// DTCoreText
|
|
//
|
|
// Created by Austen Green on 5/6/13.
|
|
// Copyright (c) 2013 Drobnik.com. All rights reserved.
|
|
//
|
|
|
|
#import "DTAccessibilityViewProxy.h"
|
|
|
|
@implementation DTAccessibilityViewProxy
|
|
|
|
- (id)initWithTextAttachment:(DTTextAttachment *)textAttachment delegate:(id<DTAccessibilityViewProxyDelegate>)delegate
|
|
{
|
|
_textAttachment = textAttachment;
|
|
_delegate = delegate;
|
|
return self;
|
|
}
|
|
|
|
- (UIView *)proxiedView
|
|
{
|
|
return [self.delegate viewForTextAttachment:self.textAttachment proxy:self];
|
|
}
|
|
|
|
- (Class)class
|
|
{
|
|
Class aClass = [[self proxiedView] class];
|
|
|
|
if (!aClass)
|
|
aClass = [DTAccessibilityViewProxy class];
|
|
|
|
return aClass;
|
|
}
|
|
|
|
- (NSMethodSignature *)methodSignatureForSelector:(SEL)sel
|
|
{
|
|
NSMethodSignature *signature = [UIView instanceMethodSignatureForSelector:sel];
|
|
|
|
return signature;
|
|
}
|
|
|
|
- (void)forwardInvocation:(NSInvocation *)invocation
|
|
{
|
|
UIView *view = [self proxiedView];
|
|
[invocation invokeWithTarget:view];
|
|
}
|
|
|
|
- (BOOL)isEqual:(id)object
|
|
{
|
|
return [[self proxiedView] isEqual:object];
|
|
}
|
|
|
|
- (NSUInteger)hash
|
|
{
|
|
return [[self proxiedView] hash];
|
|
}
|
|
|
|
@end
|