|
板凳
楼主 |
发表于 2014-7-10 10:04:34
|
只看该作者
-(void)OnAnyChatTextMsgCallBack:(int)dwFromUserid :(int)dwToUserid :(BOOL)bSecret :(NSString *)lpMsgBuf
{
[numArray addObject:lpMsgBuf];
label.text = @"";
//设置未读消息提醒label
label = [[UILabel alloc]initWithFrame:CGRectMake(280, 5, 20, 30)];
label.backgroundColor = [UIColor purpleColor];
label.textAlignment = NSTextAlignmentCenter;
NSNumber * num = [NSNumber numberWithInt:dwFromUserid];
NSIndexPath * indexPath = [NSIndexPath indexPathForRow:[dataArray indexOfObject:num] inSection:0];
UITableViewCell * cell = [tableView cellForRowAtIndexPath:indexPath];
[cell addSubview:label];
NSString * str = [NSString stringWithFormat:@"%d",numArray.count];
label.text = numArray.count == 0?@"":str;
}
就这个方法 只有不经过[self.navigationController pushViewController:meGC animated:YES]这个方法推出v2就能成功调用 但是只要推出v2 在回到v1的话 这个方法就不在调用了 |
|