一点 误删,

if (albumArray.count == 2) {//张图片

        AlbumInfo *info = [albumArray objectAtIndex:0];

        self.firstBtn.hidden = NO;

        self.firstBtn.tag = info.idNumber;

        if (info.image) {

            [self.firstBtnsetBackgroundImage:info.imageforState:UIControlStateNormal];

            if (info.isLast) {

                [self.firstBtnaddTarget:selfaction:@selector(chooseImage:) forControlEvents:UIControlEventTouchUpInside];

                [self.firstBtnsetBackgroundImage:nilforState:UIControlStateNormal];

 

            }

 

        }else{

            [self.firstBtn setBackgroundImageWithURL:[NSURL URLWithString:info.thumb]];

            [self.firstBtnaddGestureRecognizer:[selfclickOnceTapGestureFactory]];

            [self.firstBtn addGestureRecognizer:[self longPressGesFactory]];

        }

        self.firstImageView.hidden = NO;

 

        AlbumInfo *info2 = [albumArray objectAtIndex:1];

        self.secondBtn.hidden = NO;

        self.secondBtn.tag = info2.idNumber;

        if (info2.image) {

            [self.secondBtnsetBackgroundImage:info2.imageforState:UIControlStateNormal];

            if (info2.isLast) {

                [self.secondBtnaddTarget:selfaction:@selector(chooseImage:) forControlEvents:UIControlEventTouchUpInside];

                [self.secondBtnsetBackgroundImage:nilforState:UIControlStateNormal];

 

            }

 

        }else{

            [self.secondBtn setBackgroundImageWithURL:[NSURL URLWithString:info2.thumb]];

            [self.secondBtnaddGestureRecognizer:[selfclickOnceTapGestureFactory]];

            [self.secondBtn addGestureRecognizer:[self longPressGesFactory]];

        }

        self.secondImageView.hidden = NO;

 

    }

posted @ 2013-08-23 14:45  路在脚下,  阅读(165)  评论(0编辑  收藏  举报