addSubView to UIButton addSubView to UIButton ios ios

addSubView to UIButton


I found a quick solutions. I needed to set the asyncimageview to the following:

asyncImage.userInteractionEnabled = NO;        asyncImage.exclusiveTouch = NO;

After this it worked!


try:

[UIButton buttonWithType:UIButtonTypeCustom];

instead of:

[UIButton buttonWithType:UIButtonControlType];


Have you tried to put:

[asyncImage setUserInteractionEnabled:YES];