打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
UIKeyInput, UITextInput
#import "Pedal_ProtocolViewController.h"@implementation Pedal_ProtocolViewController@synthesize myTextField;- (void)dealloc{ [super dealloc];}- (void)didReceiveMemoryWarning{ // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use.}#pragma mark - View lifecycle// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.- (void)viewDidLoad{[super viewDidLoad];[myTextField canBecomeFirstResponder];[myTextField becomeFirstResponder];}- (void)viewDidUnload{ [super viewDidUnload]; // Release any retained subviews of the main view. // e.g. self.myOutlet = nil;}- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{ // Return YES for supported orientations return YES;}#pragma mark -#pragma mark UIKeyInput Protocol Methods- (BOOL)hasText { return NO;}- (void)insertText:(NSString *)theText {}- (void)deleteBackward {}- (BOOL)canBecomeFirstResponder { return YES; }#pragma mark -#pragma mark UITextInput Protocol Methods- (NSString *)textInRange:(UITextRange *)range { return @"";}- (void)replaceRange:(UITextRange *)range withText:(NSString *)text {}- (void) setSelectedTextRange: (UITextRange *) range {}- (UITextRange *) markedTextRange { return nil;}- (NSDictionary *) markedTextStyle { return nil;}- (void) setMarkedTextStyle: (NSDictionary *) style {}- (void)setMarkedText:(NSString *)markedText selectedRange:(NSRange)selectedRange {}- (void) unmarkText {}- (UITextPosition *) endOfDocument { //DOWN KEY NSLog(@"Down"); return nil;}- (UITextPosition *) beginningOfDocument { //UP KEY NSLog(@"UP"); return nil;}- (UITextRange *)textRangeFromPosition:(UITextPosition *)fromPosition toPosition:(UITextPosition *)toPosition{ return nil;}- (UITextPosition *)positionFromPosition:(UITextPosition *)position offset:(NSInteger)offset{ return nil;}- (UITextPosition *)positionFromPosition:(UITextPosition *)position inDirection:(UITextLayoutDirection)direction offset:(NSInteger)offset { return nil;}- (NSComparisonResult) comparePosition: (UITextPosition *)position toPosition: (UITextPosition *)other { return NSOrderedSame;}- (NSInteger) offsetFromPosition: (UITextPosition *)from toPosition: (UITextPosition *)toPosition { return 0;}- (void) setInputDelegate: (id <UITextInputDelegate>) delegate {}- (id <UITextInputDelegate>) inputDelegate { return nil;}- (id <UITextInputTokenizer>) tokenizer { return nil;}- (UITextPosition *)positionWithinRange:(UITextRange *)range farthestInDirection:(UITextLayoutDirection)direction { return nil;}- (UITextRange *) characterRangeByExtendingPosition: (UITextPosition *) position inDirection: (UITextLayoutDirection) direction { return nil;}- (UITextWritingDirection) baseWritingDirectionForPosition: (UITextPosition *)position inDirection: (UITextStorageDirection)direction { return 0;}- (void) setBaseWritingDirection: (UITextWritingDirection)writingDirection forRange:(UITextRange *)range {}- (CGRect) firstRectForRange: (UITextRange *) range { return CGRectZero;}- (CGRect) caretRectForPosition: (UITextPosition *) position { return CGRectZero;}- (UITextPosition *) closestPositionToPoint: (CGPoint)point { return nil;}- (UITextPosition *) closestPositionToPoint: (CGPoint)point withinRange: (UITextRange *) range { return nil;}- (UITextRange *) characterRangeAtPoint: (CGPoint)point { return nil;}- (UITextRange *) selectedTextRange { return [[UITextRange alloc]init];}@end
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
iOS友盟第三方登录分享
下拉刷新
TableView的详细设置
UITableView 上拉刷新,下拉刷新
ios app唤起页面跳转
IOS
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服