UIButton does not get touched when supervisor has position

I have a view that has three buttons. If I set the zPosition for the view to be on top, the buttons located on it do not receive strokes.

However, as soon as you leave the zPosition of the default view, the buttons will start receiving strokes. I have checked all the usual suspects that brought ToFront and so on and nothing seems to work.

What is wrong here, there is some significant gap in my understanding.

self.dropDownMenu.layer.shadowColor = [UIColor blackColor].CGColor;
self.dropDownMenu.layer.shadowOffset = CGSizeMake(0.0, -3.0);
self.dropDownMenu.layer.shadowOpacity = 0.5;
self.dropDownMenu.layer.shadowRadius = 4.0;
self.dropDownMenu.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.dropDownMenu.bounds].CGPath;
self.dropDownMenu.layer.zPosition = 20.0;
[self.dropDownMenu bringSubviewToFront:self.breakfastBtn];

      

+3
ios objective-c uibutton uiview zposition


source to share


No one has answered this question yet

Check out similar questions:

1665
How can I get the UITextField to move upward when there is a keyboard - when starting editing?
556
Send and receive messages via NSNotificationCenter in Objective-C?
536
How can I create a basic UIButton programmatically?
445
How do I set the UIButton title to be left aligned?
422
iOS - Disable keyboard on touch outside of UITextField
366
Set UIBabton title UILabel font size programmatically
353
How can I add multiline text to UIButton?
286
UIButton removes all target actions
230
How do I add a touch event to a UIView?
224
How can I change the background color of a UIButton when it is selected?



All Articles
Loading...
X
Show
Funny
Dev
Pics