Thursday, 5 September 2013

Calling an action once a view (window) that was made programmatically is touched

Calling an action once a view (window) that was made programmatically is
touched

I'm currently creating a drop-down search bar inside my app. When the drop
down animation begins a new -UIView overlays the current one to create the
black transparent effect.
However I need to know how I can create a listener that sends an action
once my -UIView is touched.
This is how I created the transparent -UIView / -UIWindow
UIWindow* window = [UIApplication sharedApplication].keyWindow;
blackView = [[UIView alloc] initWithFrame: CGRectMake ( 0, 0, 320, 750)];
blackView.backgroundColor = [UIColor blackColor];
[window addSubview:blackView];
blackView.alpha = 0.6;
Image of the drop-down and the -UIView.

No comments:

Post a Comment