任何人都可以告诉我如何为我在UITableView上添加的视图添加两个标签Cell.i已经创建了具有一些名称的UIView视图.我在UIView类中创建了两个标签,还为标签设置了框架,设置了文本和我的问题是在tableview单元格中获取该视图但不是那些标签.
countLabel.text = @"4";
countLabel.frame=CGRectMake(275, 10, 20, 15);
countLabel.font=[UIFont boldSystemFontOfSize:15.0];
countLabel.textColor=[UIColor colorWithWhite:0.0 alpha:0.5];
countLabel.backgroundColor=[UIColor clearColor];
hrsLabel.text = @"Hours";
hrsLabel.frame=CGRectMake(260, 30, 45, 15);
hrsLabel.font=[UIFont boldSystemFontOfSize:15.0];
hrsLabel.textColor=[UIColor colorWithWhite:0.0 alpha:0.5];
hrsLabel.backgroundColor=[UIColor clearColor];
Run Code Online (Sandbox Code Playgroud)
这只是我在UIView.and中设置框架,文本到标签
GreenView *greenView = [[GreenView alloc] initWithFrame:CGRectMake(250, 8, 60, 50)];
greenView.backgroundColor = [UIColor colorWithRed:0.000 green:0.690 blue:0.313 alpha:0.5];
[cell.contentView addSubview:greenView];
Run Code Online (Sandbox Code Playgroud)
在这里我将UIView添加到tableview cell.and我不知道如何将这些标签添加到我的UIView.请帮我.
抱歉,如果英语有任何错误.有人请帮助我.非常感谢.
我已经试过验证URL以便在我的代码中发送到服务,任何人都可以给我正则表达式来验证应该以http://开头的URL,并且应该以.com,.org,.net,.edu,.in 结尾.url.i中的其他一些常见结局已搜索了很多,但我得到了准确的这种类型正则表达式.请帮助我.提前致谢.