Added delegates for UIView and UIImageView.