ios - Zooming is not working after after Xcode 8 upgrade -
i use swift. viewforzoominginscrollview
not working after upgraded xcode version 8. zooming code working before updated xcode. code.
import uikit class viewcontroller: uiviewcontroller,uiscrollviewdelegate { /*scrollview zoom code 01*/ @iboutlet var scrollview: uiscrollview! @iboutlet var imageview: uiview! override func viewdidload() { super.viewdidload() /*scrollview zoom code 02*/ self.scrollview.minimumzoomscale = 1.0 self.scrollview.maximumzoomscale = 6.0 } override func didreceivememorywarning() { super.didreceivememorywarning() } /*scrollview zoom code 03*/ func viewforzoominginscrollview(scrollview: uiscrollview) -> uiview? { return imageview } }
xcode suggest new code not work zooming when running on iphone:
replace method func viewforzooming(in scrollview: uiscrollview) -> uiview?
, should work method.
Comments
Post a Comment