Thursday 15 August 2013

iphone - Value stored to "lastScale" is never read -


I'd analysis which I have an authentication method that does not have a particular variable validation criteria.

code:

  - (minus) scale text view: (UIPinchGestureRecognizer *) pinchGestRecognizer {CGFloat scale = pinchGestRecognizer.scale; CGFloat lastScale; Previous = 1.0 = 1.0; If ([Pincgestraikaijr state] == Uaijasterraikaijijhrstet ended) {// reset the final scheme last.Scale = 1.0; Return; } If ([Pinpijastraikaijr state] == Uaijesterraikaijrstetbagn || [Pencgstraikaijr State] == Uaijestorraikaijrstet Chenjed) {Sijiflot Pincskel = [Pinpgetrekkinaijhr Scale]; CGFloat scaleDiff = PinchScale - previous scalves; If (ScalDiff & lt; 0) {scaleDiff * = 2; // zoom-out speed [self zoom Sinbol selection object Scale -skel]; } And {scaleDiff * = 0.7; // slow down zoom-in [self zoomsymbol: selection object scale: scale]; Previous = scale = pinch; }}}   

I get a warning: 'Value stored in previous Sky is never read' and never read values ​​stored on 'Scale Diff' 'Can someone explain to me that The problem here is thanks to everyone! The

Last Skaikl is is a local variable and will not draw it ever gesture The state property of the identifier of all cases you should use a still variable instead.

  Fixed CGFloat lastScale = 1.0; ...    

No comments:

Post a Comment