导演:李连杰
主演:李连杰 赵尔康 宋佳 Kurt·Roland·Petersson Paulo·T
关键词:动作 战争
";
NSLog(@"%@",commentString);
CGSize size = [c
";
NSLog(@"%@",commentString);
CGSize size = [commentString sizeWithFont:[UIFont systemFontOfSize:14.0] constrainedToSize:CGSizeMake(self.view.frame.size.width - 16 - 16, MAXFLOAT) lineBreakMode:NSLineBreakByCharWrapping];
UILabel *contentLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 50, size.width, size.height)];
contentLabel.backgroundColor = [UIColor clearColor];
contentLabel.numberOfLines = 0;
contentLabel.text = commentString;
[self.view addSubview:contentLabel];
if (size.height self.navigationController.navigationBar.frame.size.height > self.view.frame.size.height)
{
UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:self.view.bounds];
scrollView.backgroundColor = [UIColor clearColor];
[self.view addSubview:scrollView];
[scrollView addSubview:contentLabel];
scrollView.contentSize = CGSizeMake(size.width,size.height 64);
}
//小蕊
//
// UITextView *contentView = [[UITextView alloc] initWithFrame:CGRectMake(16, 50, size.width, size.height)];
// contentView.backgroundColor = [UIColor clearColor];
// contentView.text = commentString;
//
//// contentView.backgroundColor = [UIColor whiteColor];
//// contentView.alpha = 0.2;
// contentView.font = [UIFont systemFontOfSize:14.0];
// contentView.editable = NO;
// contentView.scrollEnabled = NO;
// contentView.userInteractionEnabled = NO;
// [self.view addSubview:contentView];
TTTAttributedLabel *contentLabel1 = [[TTTAttributedLabel alloc] initWithFrame:CGRectMake(16, 50, size.width, size.height)];
contentLabel1.numberOfLines = 0;
contentLabel1.lineSpacing = 3.0;
contentLabel1.verticalAlignment = TTTAttributedLabelVerticalAlignmentTop;
contentLabel1.font = [UIFont systemFontOfSize:14.0];
contentLabel1.backgroundColor = [UIColor clearColor];
[self.view addSubview:contentLabel1];
contentLabel1.delegate = self;
contentLabel1.enabledTextCheckingTypes = NSTextCheckingTypeLink;
contentLabel1.text = commentString;
}
#pragma mark - TTTAttributedLabelDelegate
/*
*设置链接的点击事件
*/
- (void)attributedLabel:(TTTAttributedLabel *)label didSelectLinkWithURL:(NSURL *)url
{
NSLog(@"url = %@",url);
//中国
if ([[url absoluteString] isEqualToString:@"china"])
{
NSLog(@"china");
}
//美国 抗日
if ([[url absoluteString] isEqualToString:@"http://baike.baidu.com/view/42641.htm?fr=aladdin"])
{
NSLog(@"war");
}
}
@end
详情
更多影视:
影林影视