如何将UITextView
中的UIActionSheet
子类化为canBeforeFirstResponder
中的disable copy, select, and select all
覆盖UITextView
。
#import <UIKit/UIKit.h>
@class English;
@protocol EnglishDelegate
- (void)dismissViewDidFinish:(UIViewController *)viewController;
@end
@interface English: UIViewController <UITextViewDelegate, UIScrollViewDelegate>
{
id<EnglishDelegate> delegate;
UITextView *textView;
UINavigationBar *navBar;
UINavigationController *navigationController;
}
@property (nonatomic, retain) UITextView *textView;
@property (nonatomic, assign) UINavigationBar *navBar;
@property (strong, nonatomic) UINavigationController *navigationController;
@property (nonatomic, assign) id<EnglishDelegate> delegate;
@property (nonatomic, retain) UIScrollView *scrollView;
-(void)dismissView:(id)sender;
@end
任何人都知道如何在h文件中对其进行子类化。
感谢您的帮助。
答案 0 :(得分:2)
你不会在另一个类中继承UITextView
;您只需将其子类化为另一个文件,并覆盖canBecomeFirstResponder
,如下所示:
- (BOOL)canBecomeFirstResponder {
return NO;
}