我实施 tableviewcell ,显示用户porfile图片或其他用户图片每个图片都包含自己的 like,comment,description < / strong>喜欢facebook app。
现在我的应用只是向左或向右滑动图片用户可以查看更多图片,但问题是喜欢,评论,描述在滑动后,用户仍然会看到第一张图片的赞,评论,描述,但该图片无法显示。
我希望将他更改为 pageviewcontroller ,因为当用户想查看其他图片时,他还可以看到,评论,该图片的描述
我很久以前就嗤之以鼻,我在一周前问了同样的问题,但我仍然无法得到任何解决方案。
请给我一个链接,示例或代码他 我的例子,我可以轻松理解。
这是我的代码,请看。谢谢。!
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"simpleTableIdentifier"];
if(tableView.tag==9){
if(cell==nil){
cell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"simpleTableIdentifier"];
UIButton *btnusername=[[UIButton alloc] init];
btnusername.tag=3;
UILabel *lblusername=[[UILabel alloc] init];
lblusername.tag=2;
UILabel *lblmainIndex=[[UILabel alloc] init];
UILabel *lblindex=[[UILabel alloc] init];
[btnusername addSubview:lblmainIndex];
[btnusername addSubview:lblindex];
[cell.contentView addSubview:lblusername];
[cell.contentView addSubview:btnusername];
}
UILabel *lbltag= [tableView.subviews objectAtIndex:1];
int ie=[lbltag.text intValue];int s=indexPath.row;
if(indexPath.row>=[[tableComments objectAtIndex:[lbltag.text intValue]] count]){
cell.backgroundColor=[UIColor colorWithRed:9.0/255.0 green:129.0/255.0 blue:104.0/255.0 alpha:1.0];
}
else{
cell.backgroundColor=[UIColor whiteColor];
UILabel *lblusername=[cell.contentView viewWithTag:2];
lblusername.frame=CGRectMake([gclass getWidth: 25],[gclass getHeight: 2],[gclass getWidth: 300],[gclass getHeight: 16]);
lblusername.font=[UIFont fontWithName:@"Lato-Regular" size:[gclass setFontSize:10.0 ParentView:self.view] ];
NSDictionary *dict=[[tableComments objectAtIndex:[lbltag.text intValue]]objectAtIndex:indexPath.row];
UIButton *btnusername=[cell.contentView viewWithTag:3];
btnusername.frame=CGRectMake([gclass getWidth: 23],[gclass getHeight: 1], [[dict valueForKey:@"username"] length]*[gclass getWidth: 8.3],[gclass getHeight: 14]);
UILabel *lblmainIndex=[[btnusername subviews] objectAtIndex:0];
UILabel *lblindex=[[btnusername subviews] objectAtIndex:1];
[btnusername addTarget:self action:@selector(navigatenew:) forControlEvents:UIControlEventTouchDown];
lblmainIndex.text=lbltag.text;
lblindex.text=[NSString stringWithFormat:@"%d",indexPath.row];
UIFont *arialFont ;
arialFont= [UIFont fontWithName:@"Lato-Regular" size:[gclass setFontSize:12.0 ParentView:self.view]];
NSDictionary *arialDict =
@{ NSForegroundColorAttributeName : [UIColor colorWithRed:9.0/255.0 green:129.0/255.0 blue:104.0/255.0 alpha:1.0],NSFontAttributeName:arialFont };
[NSDictionary dictionaryWithObject: arialFont forKey:NSFontAttributeName];
NSMutableAttributedString *aAttrString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@ ",[dict valueForKey:@"username"]] attributes: arialDict];
UIFont *VerdanaFont;
VerdanaFont = [UIFont fontWithName:@"Lato-Regular" size:[gclass setFontSize:9.0 ParentView:self.view]];
NSDictionary *verdanaDict = [NSDictionary dictionaryWithObject:VerdanaFont forKey:NSFontAttributeName];
NSMutableAttributedString *vAttrString = [[NSMutableAttributedString alloc]initWithString:[[dict valueForKey:@"text"] substringToIndex:[[dict valueForKey:@"text"]length]>[gclass getWidth: 100]?[gclass getWidth: 100]:[[dict valueForKey:@"text"] length]] attributes:verdanaDict];
[aAttrString appendAttributedString:vAttrString];
lblusername.attributedText=aAttrString;
}
cell.selectionStyle=UITableViewCellSelectionStyleNone;
return cell;
}
if(cell==nil){
cell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"simpleTableIdentifier"];
UIImageView *eventimg =[[UIImageView alloc] init];
eventimg.tag=1;
[cell.contentView addSubview:eventimg];
UILabel *lblTxttag=[[UILabel alloc] init];
UIView *viewComment=[[UIView alloc] init];
viewComment.tag=9093;
UITextView *txtView=[[UITextView alloc] init];
txtView.tag=5;
UIButton *btnAddCommment=[[UIButton alloc] init];
UILabel *lblAdd=[[UILabel alloc] init];
lblAdd.tag=9;
UILabel *lblComment=[[UILabel alloc] init];
lblComment.tag=8;
lblAdd.textAlignment=NSTextAlignmentCenter;
lblComment.textAlignment=NSTextAlignmentCenter;
btnAddCommment.tag=6;
UILabel *lbltaeg=[[UILabel alloc] init];
[txtView addSubview:lblTxttag];
[btnAddCommment addTarget:self action:@selector(btnAddCommentClick:)
forControlEvents:UIControlEventTouchDown];
[viewComment addSubview:txtView];
[viewComment addSubview:lblAdd];
txtView.delegate=self;
[viewComment addSubview:lblComment];
[viewComment addSubview:btnAddCommment];
UILabel *lblEventName=[[UILabel alloc] init];
lblEventName.tag=2;
[cell.contentView addSubview:lblEventName];
UIButton *btnEventClick = [[UIButton alloc] init];
btnEventClick.tag=32;
[btnEventClick addTarget:self action:@selector(eventInfo:) forControlEvents:UIControlEventTouchDown];
[cell.contentView addSubview:btnEventClick];
SwipeView *swip=[[SwipeView alloc] init];
swip.tag=3;
[cell.contentView addSubview:swip];
UIButton *btnlike=[[UIButton alloc] init];
btnlike.tag=4;
UILabel *lblliketag=[[UILabel alloc] init];
lblliketag.tag=12;
[btnlike addSubview:lblliketag];
[btnlike addTarget:self action:@selector(btnLikeClick:) forControlEvents:UIControlEventTouchDown];
[cell.contentView addSubview:btnlike];
UIButton *btnblast=[[UIButton alloc] init];
btnblast.tag=5;
UILabel *lblblasttag=[[UILabel alloc] init];
lblblasttag.tag=12;
[btnblast addSubview:lblblasttag];
[cell.contentView addSubview:btnblast];
[btnblast addTarget:self action:@selector(btnBlastClick:) forControlEvents:UIControlEventTouchDown];
UIButton *btncomment=[[UIButton alloc] init];
UILabel *lblcommenttag=[[UILabel alloc] init];
btncomment.tag=6;
[btncomment addTarget:self action:@selector(btnCommentClick:) forControlEvents:UIControlEventTouchDown];
[btncomment addSubview:lblcommenttag];
[cell.contentView addSubview:btncomment];
UILabel *lblusername=[[UILabel alloc] init];
lblusername.tag=7;
[cell.contentView addSubview:lblusername];
UITextView *lblDescription=[[UITextView alloc] init];
lblDescription.tag=8;
[gclass SetBorder:lblDescription borderRadius:10.0 borderColor:[UIColor colorWithRed:9.0/255.0 green:129.0/255.0 blue:104.0/255.0 alpha:1.0] borderWidth:0.5 radiusShadow:1.0];
[cell.contentView addSubview:lblDescription];
UILabel *lbltag=[[UILabel alloc] init];
lbltag.tag=11;
[btnblast addSubview:lbltag];
UITableView *tblComments=[[UITableView alloc] init];
tblComments.tag=9;
[tblComments addSubview:lbltag];
[cell.contentView addSubview:tblComments];
UILabel *lblBottomLine=[[UILabel alloc] init];
lblBottomLine.tag=15;
[cell.contentView addSubview:lblBottomLine];
UIButton*btuserclick=[[UIButton alloc] init];
btuserclick addTarget:self action:@selector(btnshowprofile:) forControlEvents:UIControlEventTouchDown];
btuserclick.tag=35;
[cell.contentView addSubview:btuserclick];
[cell.contentView addSubview:viewComment];
UILabel *lblNoComments=[[UILabel alloc] init];
lblNoComments.tag=-9;
[cell.contentView addSubview:lblNoComments];
UIButton *btnEvent=[[UIButton alloc] init];
btnEvent.tag=-1044;
[cell.contentView addSubview:btnEvent];
}
if([sochalifearray count]==0){
return cell;
}
NSDictionary *dict=[sochalifearray objectAtIndex:indexPath.row];
UIImageView *eventimg =[cell.contentView viewWithTag:1];
[eventimg sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat :@"%@%@",thumbs, [dict valueForKey:@"event_pic"]]] placeholderImage:[UIImage imageNamed: @"image_default.png"]];
UILabel *lblEventName=[cell.contentView viewWithTag:2];
lblEventName.text=[NSString stringWithFormat:@"%@" , [[dict valueForKey:@"ename"] uppercaseString]];
UIButton *btnEventClick=[cell.contentView viewWithTag:32];
lblEventName.textColor=[UIColor blackColor];
SwipeView *swip=[cell.contentView viewWithTag:3];
lblEventName.font=[UIFont fontWithName:@"Lato-Regular" size:[gclass setFontSize:13.0 ParentView:self.view]];
lblEventName.frame=CGRectMake([gclass getWidth: 35],[gclass getHeight: 13],[gclass getWidth: 240],[gclass getHeight: 20]);
eventimg.frame=CGRectMake([gclass getWidth: 5],[gclass getHeight: 5],[gclass getWidth: 30], [gclass getHeight: 30]);
swip.frame=CGRectMake([gclass getWidth: 5],[gclass getHeight: 40],[gclass getWidth: 310],[gclass getHeight: 310]);
[lblEventName sizeToFit];
btnEventClick.frame=eventimg.frame;
CGRect cg= btnEventClick.frame;
cg.size.width=cg.size.width+cg.origin.x+lblEventName.frame.origin.x+lblEventName.frame.size.width;
btnEventClick.frame=cg;
[btnEventClick setTitleColor:[UIColor clearColor] forState:UIControlStateNormal];
[btnEventClick setTitle:[NSString stringWithFormat:@"%@",[dict valueForKey:@"eid"]] forState:UIControlStateNormal];
eventimg.layer.cornerRadius=eventimg.frame.size.width/2;
eventimg.clipsToBounds=true;
swip.dataSource=self;
swip.delegate=self;
swip.alignment = SwipeViewAlignmentCenter;
swip.pagingEnabled = YES;
swip.itemsPerPage = 1;
swip.truncateFinalPage = YES;
swip.promoter_id=
[dict valueForKey:@"promoter_id"];
swip.gallery= [dict valueForKey:@"images"];
[swip reloadData];
UIButton *btnlike=[cell.contentView viewWithTag:4];
[btnlike setTitle:[NSString stringWithFormat:@"Like %@",[dict valueForKey:@"like_count"]] forState:UIControlStateNormal];
UIButton *btnblast=[cell.contentView viewWithTag:5];
[btnblast setTitle:[NSString stringWithFormat:@"Blast %@",[dict valueForKey:@"blast_count"]] forState:UIControlStateNormal];
[btnblast setTitleColor:[UIColor colorWithRed:9.0/255.0 green:129.0/255.0 blue:104.0/255.0 alpha:1.0] forState:UIControlStateNormal];
UIButton *btncomment=[cell.contentView viewWithTag:6];
btncomment setTitleColor:[UIColor colorWithRed:9.0/255.0 green:129.0/255.0 blue:104.0/255.0 alpha:1.0] forState:UIControlStateNormal];
btnlike.font=[UIFont fontWithName:@"Lato-Regular" size:[gclass setFontSize:12.0 ParentView:self.view]];
btnlike.frame=CGRectMake([gclass getWidth: 5],[gclass getHeight: 353],[gclass getWidth: 45], [gclass getHeight: 20]);
btnblast.frame=CGRectMake([gclass getWidth: 60],[gclass getHeight: 353],[gclass getWidth:50], [gclass getHeight: 20]);
btnblast.font=[UIFont fontWithName:@"Lato-Regular" size:[gclass setFontSize:12.0 ParentView:self.view]];
btncomment.frame=CGRectMake([gclass getWidth: 120],[gclass getHeight: 353],[gclass getWidth: 80],[gclass getHeight: 20]);
btncomment.font=[UIFont fontWithName:@"Lato-Regular" size:[gclass setFontSize:12.0 ParentView:self.view]];
[btnlike setTitleColor:[UIColor colorWithRed:9.0/255.0 green:129.0/255.0 blue:104.0/ 255.0 alpha:1.0] forState:UIControlStateNormal];
UILabel *lblcommenttag=[[btncomment subviews] objectAtIndex:0];
lblcommenttag.text=[NSString stringWithFormat:@"%ld",(long)indexPath.row];
UILabel *lblusername=[cell.contentView viewWithTag:7];
UIFont *arialFont = [UIFont fontWithName:@"Lato-Regular" size:[gclass setFontSize:13.0 ParentView:self.view]];
NSDictionary *arialDict =
@{ NSForegroundColorAttributeName : [UIColor blueColor],NSFontAttributeName:arialFont };
[NSDictionary dictionaryWithObject: arialFont forKey:NSFontAttributeName];
NSMutableAttributedString *aAttrString = [[NSMutableAttributedString alloc] initWithString:[dict valueForKey:@"username"] attributes: arialDict];
UIFont *VerdanaFont ;
VerdanaFont=[UIFont fontWithName:@"Lato-Regular" size:[gclass setFontSize:10.0 ParentView:self.view]];
NSDictionary *verdanaDict = [NSDictionary dictionaryWithObject:VerdanaFont forKey:NSFontAttributeName];
NSString *captionString=[[dict valueForKey:@"description"] isEqual:@""]?@"no caption":@"caption";
NSMutableAttributedString *vAttrString = [[NSMutableAttributedString alloc]initWithString: [NSString stringWithFormat:@" %@",captionString] attributes:verdanaDict];
[aAttrString appendAttributedString:vAttrString];
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@ %@",[dict valueForKey:@"username"],[NSString stringWithFormat:@" %@",captionString]]];
[attributedString addAttributes:[[NSDictionary alloc] initWithObjectsAndKeys:
NSFontAttributeName, [UIFont fontWithName:@"Lato-Regular" size:[gclass setFontSize:18.0 ParentView:self.view]],
NSForegroundColorAttributeName, [UIColor blueColor],
nil]
range:NSMakeRange(0, [[dict valueForKey:@"username"] length])];//9 is the length of "user name"
[attributedString addAttributes:[[NSDictionary alloc] initWithObjectsAndKeys:
NSFontAttributeName, [UIFont fontWithName:@"Lato-Regular" size:[gclass setFontSize:15.0 ParentView:self.view]],
NSForegroundColorAttributeName, [UIColor blueColor],
nil]
range:NSMakeRange([[dict valueForKey:@"username"] length], [captionString length])];
lblusername.attributedText=aAttrString;
UIButton *btnuserclick=[cell.contentView viewWithTag:35];
lblusername.frame=CGRectMake([gclass getWidth: 10],[gclass getHeight: 375],[gclass getWidth: 200],[gclass getHeight: 15]);
[lblusername sizeToFit];
btnuserclick.frame=lblusername.frame;
[btnuserclick setTitle:[dict valueForKey:@"uid"] forState:UIControlStateNormal];
[btnuserclick setTitleColor:[UIColor clearColor] forState:UIControlStateNormal];
UITextView *lblDescription=[cell.contentView viewWithTag:8];
NSArray *des=[swip.gallery valueForKey:@"description"];
NSLog(@"des:%@",des);
lblDescription.text=[NSString stringWithFormat:@" %@", des];
lblDescription.frame=CGRectMake([gclass getWidth: 10],[gclass getHeight: 395],[gclass getWidth: 748],[gclass getHeight: 30]);//getHeight: 20
lblDescription sizeToFit];
lblEventName.textColor=[UIColor colorWithRed:9.0/255.0 green:129.0/255.0 blue:104.0/255.0 alpha:1.0];
if([[dict valueForKey:@"description"] isEqual:@""])
{
lblDescription.frame=CGRectMake(0, 0, 0, 0);
}
else{
CGRect cg =lblDescription.frame;
cg.size.width=[gclass getWidth: 290];
lblDescription.frame=cg;
lblDescription.userInteractionEnabled=NO;
lblDescription.font=[UIFont fontWithName:@"Lato-Regular" size:[gclass setFontSize:11.0 ParentView:self.view] ];
}
UITableView *tblComments=[cell.contentView viewWithTag:9];
tblComments.frame=CGRectZero;
if(([tableComments count]-1)!=indexPath.row){
NSMutableArray *tempData=[[NSMutableArray alloc] init];
for(int i=[[dict valueForKey:@"comments"] count]-1;i>-1;i--){
[tempData addObject:[[dict valueForKey:@"comments"] objectAtIndex:i]];
}
if([tableComments count]==indexPath.row)
[tableComments addObject:tempData];
}
NSMutableArray *taf=[tableComments objectAtIndex:indexPath.row];
[btncomment setTitle:[NSString stringWithFormat:@"Comment %lu", (unsigned long)[taf count]>=4?([[dict valueForKey:@"comment_count"] intValue]>4?([[dict valueForKey:@"comment_count"] intValue]-4+[taf count]):(unsigned long)[taf count] ):(unsigned long)[taf count] ] forState:UIControlStateNormal];
@try{
tblComments.frame=CGRectMake([gclass getWidth: -20], ([gclass getHeight: 408]+(lblDescription.frame.size.height==0?[gclass getHeight:-15]:lblDescription.frame.size.height)),[gclass getWidth: 320],[[tableComments objectAtIndex:indexPath.row] count]* [gclass getHeight: 22]);
}@catch(NSException *ex){
UILabel *lblNoComments=[cell.contentView viewWithTag:-9];
tblComments.frame=CGRectMake([gclass getWidth:-20],[gclass getHeight: 430],[gclass getWidth: 320],[gclass getHeight: 30]);//getHeight: 22
lblNoComments.frame=CGRectMake([gclass getWidth:4],[gclass getHeight: 398],[gclass getWidth: 320],[gclass getHeight: 60]);//getHeight: 10 lblNoComments.text=@"No Comments";
}
UILabel *lblNoComments=[cell.contentView viewWithTag:-9];
if(tblComments.frame.size.height==0){
UILabel *lblNoComments=[cell.contentView viewWithTag:-9];
tblComments.frame=CGRectMake([gclass getWidth:-20],[gclass getHeight: 430],[gclass getWidth: 320],[gclass getHeight: 30]);//getHeight: 22
lblNoComments.frame=CGRectMake([gclass getWidth:4],[gclass getHeight: 398],[gclass getWidth: 320],[gclass getHeight: 60]); //getHeight: 10
lblNoComments.text=@"No Comments";
lblNoComments.textColor=[UIColor colorWithRed:9.0f/255.0f green:129.0f/255.0f blue:104.0f/255.0f alpha:1.0];
lblNoComments.font=[UIFont fontWithName:@"Lato-Regular" size:[gclass setFontSize:9.0 ParentView:self.view]];
}
else{
lblNoComments.frame=CGRectMake(0, 0, 0,0);
lblNoComments.text=@"";
}
tblComments.separatorStyle=UITableViewCellSeparatorStyleNone;
int tba=[tblComments.subviews count];
UILabel *lbltag= [tblComments.subviews objectAtIndex:1];
lbltag.text=[NSString stringWithFormat:@"%ld",(long)indexPath.row];
UILabel *lbls =[[btnblast subviews] objectAtIndex:0];
lbls.text=lbltag.text;
UILabel *lbls1 =[[btnlike subviews] objectAtIndex:0];
lbls1.text=lbltag.text;
if([[height objectAtIndex:indexPath.row] intValue]==-1){
if(UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad)
{
if([[dict valueForKey:@"description"] isEqual:@""])
[height replaceObjectAtIndex:indexPath.row withObject:[NSString stringWithFormat:@"%f",([gclass getHeight: 10.0f]+[gclass getHeight: 627.0f]+[gclass getHeight: 50.0f]+tblComments.frame.size.height)]];
else
[height replaceObjectAtIndex:indexPath.row withObject:[NSString stringWithFormat:@"%f",([gclass getHeight: 10.0f]+[gclass getHeight: 674.0f]+[gclass getHeight: 50.0f]+tblComments.frame.size.height)]];
else{
if([[dict valueForKey:@"description"] isEqual:@""])
[height replaceObjectAtIndex:indexPath.row withObject:[NSString stringWithFormat:@"%f",([gclass getHeight: 10.0f]+[gclass getHeight: 370.0f]+[gclass getHeight: 50.0f]+tblComments.frame.size.height)]];
else
[height replaceObjectAtIndex:indexPath.row withObject:[NSString stringWithFormat:@"%f",([gclass getHeight: 10.0f]+[gclass getHeight: 415.0f]+[gclass getHeight:80.0f]+[gclass getHeight: 50.0f]+tblComments.frame.size.height)]];
}
}
tblComments.scrollEnabled=NO;
tblComments.delegate=self;
tblComments.dataSource=self;
indexhold=indexPath.row;
UILabel *lblBottomLine=[cell.contentView viewWithTag:15];
lblusername.textColor=[UIColor colorWithRed:9.0/255.0 green:129.0/255.0 blue:104.0/255.0 alpha:1.0] ;
UIView *viewComment=[cell.contentView viewWithTag:9093];
UITextView *txtView=[[viewComment subviews] objectAtIndex:0];
NSArray *as=[txtView subviews];
UILabel *lblTxttag=[[txtView subviews] objectAtIndex:1];
lblTxttag.text=[NSString stringWithFormat:@"%ld",(long)indexPath.row];
UILabel *lblComment=[[viewComment subviews] objectAtIndex:2];
UIButton *btnAddComment=[[viewComment subviews] objectAtIndex:3];
UILabel *lblAdd=[[viewComment subviews] objectAtIndex:1];
lblAdd.text=@"Add";
lblComment.frame=CGRectMake([gclass getWidth:226], [gclass getHeight: 21],[gclass getWidth: 80], [gclass getHeight: 12]);
lblAdd.frame=CGRectMake([gclass getWidth:226], [gclass getHeight: 9], [gclass getWidth:80], [gclass getHeight:12]);
lblAdd.font=lblComment.font= btnAddComment.font=[UIFont fontWithName:@"Lato-Regular" size:[gclass setFontSize:10.0 ParentView:self.view]];
btnAddComment.frame=CGRectMake([gclass getWidth:222], [gclass getHeight:1],[gclass getWidth: 80], [gclass getHeight:45]);
lblComment.text=@"Comment";
lblAdd.textColor=lblComment.textColor=[UIColor whiteColor];
[btnAddComment setTitle:[NSString stringWithFormat:@"%ld",(long)indexPath.row] forState:UIControlStateNormal];
[btnAddComment setTitleColor:[UIColor clearColor] forState:UIControlStateNormal];
viewComment.backgroundColor=[UIColor colorWithRed:9.0f/255.0f green:129.0f/255.0f blue:104.0f/255.0f alpha:1.0f];
if([[dict valueForKey:@"description"] isEqual:@""])
{
viewComment.frame=CGRectMake([gclass getWidth:5], [gclass getHeight: 395]+tblComments.frame.size.height, [gclass getWidth:300],[gclass getHeight: 39]);
}
else
{
viewComment.frame=CGRectMake([gclass getWidth:5], [gclass getHeight:434]+tblComments.frame.size.height,[gclass getWidth: 300], [gclass getHeight:39]);
}
lblBottomLine.frame=CGRectMake(0, viewComment.frame.size.height+viewComment.frame.origin.y+[gclass getHeight: 5],[gclass getWidth: 320], [gclass getHeight: 2]);
txtView.frame=CGRectMake(0,0,[gclass getWidth: 238],viewComment.frame.size.height);
gclass SetBorder:txtView borderRadius:0 borderColor:[UIColor colorWithRed:9.0f/255.0f green:129.0f/255.0f blue:104.0f/255.0f alpha:1.0f] borderWidth:0.5 radiusShadow:3.0];
lblBottomLine.backgroundColor=[UIColor colorWithRed:242.0/255.0 green:242.0/255.0 blue:242.0/255.0 alpha:1.0];
[tblComments reloadData];
return cell;
}
- (UIView *)swipeView:(SwipeView *)swipeView viewForItemAtIndex:(NSInteger)index reusingView:(UIView *)view
{
if (!view)
{
view = [[UIView alloc]init];
view.frame=CGRectMake(0, 0, [gclass getWidth: 310],[gclass getHeight: 310]);
UIImageView *img=[[UIImageView alloc] init];
img.frame=view.frame;
[view addSubview:img];
}
UIImageView *img=[view.subviews objectAtIndex:0];
dict1=[swipeView.gallery objectAtIndex:index];
[img sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat :@"%@%@%@",defaulturl,event_gallery_small,[dict1 valueForKey:@"filepath"]]] placeholderImag:[UIImage imageNamed: @"image_default.png"]];
return view;
}