Sono obietta in ogg-c e ho una domanda.come ottenere determinate sottoview da uiview per tag
Ho un oggetto UILabel che l'aggiunta di un UIView con questo codice:
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0,10,self.view.frame.size.width-15-70, 30)];
label.tag = 1;
label.font = [PublicObject fontTexts:17];
label.textAlignment = NSTextAlignmentRight;
label.textColor = [UIColor whiteColor];
[cell setBackgroundColor:[UIColor clearColor]];
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 50)];
view.backgroundColor = [PublicObject colorWithHexString:@"cd4110"];
label.text = [filterData objectAtIndex:indexPath.row];
view addSubview:label];
ora voglio ottenere uno visualizzazione secondaria, a mio avviso in cui questa visualizzazione secondaria ha tag = 1 e salvarlo su un altro oggetto così:
UILabel *tagLabel;
tagLabel = //I want get one subview in view where tag = 1
per favore guidami a riguardo.
Prima di tutto, ci possono essere molte subviews con un tag. Quindi la domanda corretta è "come ottenere sottoview da uiview per tag". – nicael