Saturday, 15 August 2015

iphone - how to get first and last selected uibutton title on uiscrollview? -



iphone - how to get first and last selected uibutton title on uiscrollview? -

i creating multiple uibuttons (example- around 40 buttons) inuiscrollview` , want string first , lastly buttons selected (from -to)

you don't need tags , big array hold titles , match retrieve title. there easy way that.

just create 1 action method , connect buttons method.

then when user pressed button, action method called.

in method title of button , store in nsmutablearray. have got 2 titles after pressed 2 buttons.

- (ibaction)buttonpressed:(uibutton *)sender { [titlearray addobject:sender.titlelabel.text ]; }

iphone ios objective-c uiscrollview uibutton

No comments:

Post a Comment