UIButton *btn = (UIButton *)[cell viewwithtag:101];
btn.frame = CGRectMake(5, 5, 150, hei - 10);
[btn addtarget:self action:@selector(selectpic:) forcontrolevents:uicontroleventtouchupinside];
if ([indexpath section]==0) {
picture = [guangpicleftarray objectatindex:[indexpath row]];
}else{
picture = [guangpicrightarray objectatindex:[indexpath row]];
}
[picview setimagewithurl:[nsurl urlwithstring:picture.picurl]];
[btn setimage:picview.image forstate:uibuttontypecustom];
//begin
if (picture!=nil) {
[btntopicdic setobject:picture forkey:btn.description];
NSLog(btn.description);
}
- (void)selectPic:(UIButton *)aBtn{
DetailViewController *detail = [[detailviewcontroller alloc]init];
detail.picture = [btntopicdic objectforkey:abtn.description];
[self presentmodalviewcontroller:detail animated:yes];
}