开发者

Make UIButtons a child of another object

I have two groups of UIButtons on a view.

There are times I need to have all of the buttons in a group setEnabled to True.

There are other times that all of the buttons in a group need to be setEnabled to False:

The group is my word and not an iOS term.

I can assign these to an ar开发者_如何学JAVAray and loop through the array. This works fine.

Is there a way to group these buttons as children of another object and do something like setEnabled for all children to True/False?


Hey.. You need to set NSTimer with one bool variable to enable one by one group.. And set method where to call button group..


You could create a method in the 'parent' item that would change all the child items, but of course that would probably involve iterating through each one and changing it's enabled state. Once you've written the method, it would appear to be automatic, but there would of course be code behind it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜