首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

运用tag值找view

2012-10-23 
使用tag值找viewalbumDetailController.view.frame CGRectMake((1024-600)/2,768, 600, 500)UIView *bg

使用tag值找view
    albumDetailController.view.frame = CGRectMake((1024-600)/2,768, 600, 500);
   
    UIView *bgview = [[UIView alloc] initWithFrame:self.view.frame];
    bgview.backgroundColor = [UIColor blackColor];
    bgview.alpha = 0;
   
    bgview.tag =11001;
    [self.view addSubview:bgview];

UIView *view = (UIView*)[self.view viewWithTag:11001];

热点排行