When you click textField, there is no response and the created view (UI) is not displayed on the screen. textfieldui

Source: Internet
Author: User

When you click textField, there is no response and the created view (UI) is not displayed on the screen. textfieldui
I. Click textField and there is no response
(1) There is a view above textField (as shown below)
UITextField * tf = [[UITextField alloc] initWithFrame: CGRectMake (50,100,220, 40)];
Tf. backgroundColor = [UIColor yellowColor];
Tf. borderStyle = UITextBorderStyleRoundedRect;
[Self. window addSubview: tf];
[Tf release];

UIView * view = [[UIView alloc] initWithFrame: CGRectMake (0, 0,320,568)];
View. backgroundColor = [UIColor redColor];
[Self. window addSubview: view];

[View release];

(2) textField is out of the management scope of the parent view.
A view can manage all the child views within its range. If the child view exceeds the parent view range, it cannot respond to interaction (as shown below)
UIView * bgView = [[UIView alloc] initWithFrame: CGRectMake (0, 0,100,100)];
BgView. backgroundColor = [UIColor redColor];
// Cut down the child views beyond the management scope of the current view.
BgView. clipsToBounds = YES;
[Self. window addSubview: bgView];
[BgView release];

UITextField * tf = [[UITextField alloc] initWithFrame: CGRectMake (0, 20,320, 40)];
Tf. backgroundColor = [UIColor greenColor];
Tf. borderStyle = UITextBorderStyleRoundedRect;
[BgView addSubview: tf];

[Tf release];

(3) Click not to respond to problems (as shown below)
UITextField * tf = [[UITextField alloc] initWithFrame: CGRectMake (50,200,220, 40)];
Tf. backgroundColor = [UIColor greenColor];
// Set whether to edit
// Tf. enabled = NO;
// Set whether to respond to user interaction
Tf. userInteractionEnabled = NO;
Tf. borderStyle = UITextBorderStyleRoundedRect;
[Self. window addSubview: tf];
[Tf release];


(4) The parent view of textField cannot be interacted (as follows)
// UILabel disables user interaction by default.
UILabel * view = [[UILabel alloc] initWithFrame: CGRectMake (0, 0,320,100)];
View. backgroundColor = [UIColor redColor];
View. userInteractionEnabled = YES;
[Self. window addSubview: view];
[View release];

UITextField * tf = [[UITextField alloc] initWithFrame: CGRectMake (0, 40,320, 40)];
Tf. backgroundColor = [UIColor greenColor];
Tf. borderStyle = UITextBorderStyleRoundedRect;
[View addSubview: tf];
[Tf release];

 
2. The created view is not displayed on the screen.
(1) not added to the parent view (as shown below)
UIView * view = [[UIView alloc] initWithFrame: CGRectMake (0, 0,320,300)];
View. backgroundColor = [UIColor redColor];
[Self. window addSubview: view];
[View release];


(2) No color is set for the view, and the color is still clearColor.
(3) frame not set
(4) The view creation method is not called.
(5) The added parent view is nil.
UIView * view = nil;
UIView * view1 = [[UIView alloc] initWithFrame: CGRectMake (0, 0,320,300)];
View1.backgroundColor = [UIColor redColor];
[View addSubview: view1];
[View1 release];

The design view of Dreamweaver CS5 cannot be edited. No response is returned when you right-click or left-click it.

Please reinstall it. I have encountered this problem. The fix is ineffective. Try again.

The toolbar dynamically created in the List View area has an icon on it. It does not respond when you click the icon.

1. Whether message processing is performed to determine whether the IDs in resource. h are repeated.
2. The message is not processed. In View, PretranslateMsg processes the Toolbar message.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.