1
我對在UITextView中輸入數據時自動完成氣泡位置感到困惑。UITextView自動完成氣泡位置
我觀察到的是,根據其框架的起源,自動完成的氣泡要麼出現在頂部或底部。沒有固定位置,提供的scrollEnabled設置爲NO。
以下是兩個鏈接。代碼是用的init()
http://www.flickr.com/photos/[email protected]/6975525835/
UIView *view = [[[UIView alloc] initWithFrame:CGRectMake(0, 150, 320, 41)] autorelease];
view.backgroundColor = [UIColor grayColor];
[self.view addSubview:view];
UITextView *growingTextView = [[UITextView alloc] initWithFrame:CGRectMake(0, 10, 200, 27)];
growingTextView.font = [UIFont fontWithName:@"Helvetica" size:13];
growingTextView.scrollEnabled = NO;
[view addSubview:growingTextView];
http://www.flickr.com/photos/[email protected]/6975525727/
UIView *view = [[[UIView alloc] initWithFrame:CGRectMake(0, 50, 320, 41)] autorelease];
view.backgroundColor = [UIColor grayColor];
[self.view addSubview:view];
UITextView *growingTextView = [[UITextView alloc] initWithFrame:CGRectMake(0, 10, 200, 27)];
growingTextView.font = [UIFont fontWithName:@"Helvetica" size:13];
growingTextView.scrollEnabled = NO;
[view addSubview:growingTextView];
任何人都可以解釋這種觀察到的行爲???