UIButton
TouchUpInside
only fires when tapping on the first "x".
It's like the tappable area has shrunk even though I've not set this explicitly.
The UIButton
is created in IB initially and wired up to an IBOutlet
but then in code I set the button up in the view's init()
method.
btnHideView?.frame = CGRectMake((9.0*deviceWidth()/16.0) - 60, (viHeaderView!.frame.size.height - 30.0)/2.0, 60, 30)
btnHideView?.setTitle("xxxxxxxxx", forState: UIControlState.Normal)
btnHideView?.addTarget(self, action: Selector("hideView"), forControlEvents: UIControlEvents.TouchUpInside)
btnHideView?.tintColor = UIColor.whiteColor()
btnHideView?.layer.borderWidth = 1.0
btnHideView?.layer.borderColor = UIColor.whiteColor().CGColor
Edit: Simulator with Color Blended Layers