我已经自动生成了一些标签,现在我需要通过使用 xcode 中的标签获取其他标签的值来覆盖标签中的值。
这是我的onclick
代码:
- (IBAction)onClick1:(id)sender
{
NSString *title = [(UIButton *)sender currentTitle];
NSLog(@"title ~~~~~~~~~~~ %@",title);
for(i=0;i<vCount;i++) {
pStr = [NSString stringWithFormat:@"%c",[pStrName characterAtIndex:i]];
[pLblMyLable1 setTag:j+1];
iTag = [pLblMyLable1 tag];
NSLog(@"ssssstttttrrrrriinnnngggg on click %@", pStr);
if([title isEqualToString:pStr]){
//pStr = [NSString stringWithFormat:@"%c",[pStrName characterAtIndex:i]];
NSLog(@"came into if");
pLblMyLable1.text = pStr;
//pLblMyLable1 = [self.view viewWithTag:iTag];
// pStr = [pLblMyLable1.text:iTag];
/*pLblMyLable1 = [self.view viewWithTag:1];
pLblMyLable1 = [self.view viewWithTag:2];
pLblMyLable1 = [self.view viewWithTag:3];
pLblMyLable1 = [self.view viewWithTag:4];
pLblMyLable1 = [self.view viewWithTag:5];
pLblMyLable1 = [self.view viewWithTag:6];*/
}