Creating a View

来源:互联网 发布:js正则截取字符串 编辑:程序博客网 时间:2024/05/21 15:01

Creating a View

CGRect  viewRect = CGRectMake(10, 10, 100, 100);


UIView* myView = [[UIView alloc] initWithFrame:viewRect];

    UIView *aView =[[UIViewalloc]initWithFrame:CGRectMake(50,50, 100, 30)];

    aView.backgroundColor=[UIColorredColor];

    [self.window addSubview:aView];

    

    

    [aView release];