iphone - How to handle the touches event in subView -


here code:

mainview:

nsarray *btarray = [nsarray arraywithobjects:@"1",@"1",@"1",@"1",@"1",nil]; buttonbarcomponent *bottomebuttonbar = [[buttonbarcomponent alloc] initbuttonbarcomponentwithbuttonarray:btarray]; bottomebuttonbar.frame = cgrectmake(0, 340, 320, 200); [self.view addsubview:bottomebuttonbar]; 

subview:

-(id)initbuttonbarcomponentwithbuttonarray:(nsarray *)btarray { self = [[uiview alloc] initwithframe:cgrectmake(0, 340, 320, 200)]; self.backgroundcolor = [uicolor whitecolor]; } 

but why cant run code in touches event?

try setting user interaction enabled view , subview


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -