chegando em um UIButton com a propriedade tag IPhone
Estou com problemas para usar a propriedade tag para acessar um UIButton
UIButton *randomButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect ]];
randomButton.frame = CGRectMake(205, 145, 90, 22); // size and position of button
[randomButton setTitle:@"Random" forState:UIControlStateNormal];
randomButton.backgroundColor = [UIColor clearColor];
randomButton.adjustsImageWhenHighlighted = YES;
[randomButton addTarget:self action:@selector(getrandom:)
forControlEvents:UIControlEventTouchUpInside];
randomButton.reversesTitleShadowWhenHighlighted=YES;
randomButton.toggleButton
[self.view addSubview:randomButton];
randomButton.tag=333;
Mais tarde, no código, tento acessar o botão da seguinte maneira, o que me dá um erro dizendo
Tipos incompatíveis de Objective-C inicializando 'struct UIView *', esperado 'struct UIButton *'
UIButton *random = [self.view viewWithTag:333];
random.highlighted=NO;