父试图和子试图不能全都打开用户交互

来源:互联网 发布:it618淘宝客导购 编辑:程序博客网 时间:2024/06/08 17:28

 UIView *footView=[[UIViewalloc] initWithFrame:CGRectMake(0,0,ScreenWidth ,90)];



        UIButton *btn=[UIButtonbuttonWithType:UIButtonTypeCustom];

        [btn setImage:[UIImageimageNamed:@"8" ]forState:UIControlStateNormal];

        [btn setImage:[UIImageimageNamed:@"22" ]forState:UIControlStateHighlighted];

        btn.frame=CGRectMake(0,35, ScreenWidth,45);

        btn.userInteractionEnabled=YES;//

        

        [btn addTarget:selfaction:@selector(btnSearch)forControlEvents:UIControlEventTouchUpInside];

        [footViewaddSubview: btn];


        

        

       UILabel *lab=[[UILabelalloc] initWithFrame:CGRectMake(0,0, ScreenWidth,45)];

        lab.userInteractionEnabled =YES;//

        lab.textAlignment=NSTextAlignmentCenter;

        lab.textColor=white1;

        lab.text=@"201231日加入";

        lab.backgroundColor=[UIColorclearColor];

        lab.font=[UIFontsystemFontOfSize:15.0f];

        [btnaddSubview:lab];

        [labrelease];

       _tableView.tableFooterView=footView;

        [footViewrelease];

    




这里是脚标题,上面加上button     按钮上面再加上label文字信息。。。                   不能同时都打开用户交互   ,这样编译器识别不了时间


子试图  与  父试图  不能同时都打开用户交互。。。。  切记
原创粉丝点击