Objective
At first also thought that the code wrote a problem, click on the event there are more time-consuming card main thread code, one by one of the deletion code found not so.
Body
Not exactly the same as in the reference article, UIButton is not placed on Uiscrollview or UITableView, but Viewcontroller is supported by sliding back.
—————————————————— Gorgeous split line, search guessing problem solving ——————————————————
Solution: There is no good way to replace ImageView plus UITapGestureRecognizer bar, in addition to the click Effect Code:)
Class Uiimagevieweffect:uiimageview {
var effectalpha:cgfloat = 0.5
override func Touchesbegan (touches:set< ; Uitouch>, Withevent event:uievent?) {
alpha = Effectalpha
}
override func touchescancelled (Touches:set<uitouch>?, Withevent event: Uievent?) {
Self.alpha = 1
}
override func touchesended (touches:set<uitouch>, withevent event:uievent?) {
Self.alpha = 1
}
}
The above is to solve the iOS UIButton appeared cotton problem, the need for friends under the reference.