(iPhone SDK) How to modify UIButton by tag id? -
i've created group of buttons follows: nsstring *nameimg; uibutton *button; for(int i=1;i<=144;i++){ button = [[uibutton alloc] initwithframe:cgrectmake(posx, posy, 43, 43)]; nameimg = [nsstring stringwithformat:@"img%i.png",i]; [button setbackgroundimage:[uiimage imagenamed:nameimg] forstate:(uicontrolstate)normal]; button.tag = i; [scrollview addsubview:button]; posx += 55; if (i % 4 == 0){ posy += 55; posx = 15; } } how can modify button getting tag? it's possible following line? [button.tagid settitle:@"hello"]; i don't want listener method, want modify button identifying tag. thanks in advance [(uibutton*)[scrollview viewwithtag:tagid] settitle:@"hello" forstate:uicontrolstatenormal];