[A gull's training note] [Objective-c] [First day] [Personal notes]

Source: Internet
Author: User



Uiview,uilabel,uitextfield,viewcontroller .....



However, none of the above is quite understood ...



Here's what you learned =w=



While the Baidu side learned. So many things come from other blogs. The back will post the source.






. Frame: The position of the control relative to the parent view






The style of the UITextField.borderStyle:UITextField






The. Text: The text that the control displays






. backgroundcolor: The background color of the control (however, setting this will invalidate certain properties of the control)






Uicolor: a color class ... And yet I don't understand



Http://www.cnblogs.com/smileEvday/archive/2012/06/05/UIColor_CIColor_CGColor.html






-Addsubview: (UIView *): Add a child view to the view






CGRectMake (<cgfloat x>, <cgfloat y>, <cgfloat width>, <cgfloat height>): The X, y offset and DX of the parameter relative to the parent view, Dy. Returns a CGRect value.



http://blog.csdn.net/chengyingzhilian/article/details/7894276






addtarget:< (ID) > action:< (SEL) > forcontrolevents:< (uicontrolevents) >: The object that performs the action, the function that executes the action, And when to perform the action


[Button addtarget:self action: @selector (back:) forcontrolevents:uicontroleventtouchupinside];





↑↑↑↑ This is an example, in this viewcontroller (self), executes the back: This function, which is pressed and bounces within the space range, is a response



Here is a description of the various events http://blog.csdn.net/g5dsk/article/details/6613943






Resignfirstresponder: This can be used on Uitextfield to release the first response .... Can retract the keyboard






Uibarbutton: Buttons that can be added to the Navigationitem






pushviewcontroller:< (Uiviewcontroller *) > animated:< (BOOL) >: Launch a viewcontroller can be used to switch pages, Animated used to control whether or not to roll out animations



poptorootviewcontrolleranimated:< (BOOL);: Returns the view controller that called it. You can also choose to have no animations






/* Top is what I picked out this day to learn .... Here are some sample code that has not been collated */








    UIView *view = [[UIView alloc]init];    View.frame = CGRectMake (0, 0,.);    View.backgroundcolor = [Uicolor yellowcolor];    [Self.view Addsubview:view];
    UIView *view = [[UIView alloc]init];
    view.frame = CGRectMake(0, 0, 100, 100);
    view.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:view];

    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
    button.frame = CGRectMake(100, 100, 100, 100);
    button.backgroundColor = [UIColor blueColor];
    [button addTarget:self action:@selector(push) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button]
-(void)push{
    FirstViewController *first = [[FirstViewController alloc] init];
    [self.navigationController pushViewController:first animated:YES];
}





[A gull's training note] [Objective-c] [First day] [Personal notes]


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.