objective c - ios 7 UIView animateWithDuration: .. runs immediately -


I have trouble with the method for animation

I created my own callout bubble for GoogleMap

  @interface callout view: UIVU @ property (nonatamic) mapmarker * marker; @end @implementation {UIView * titleView; UILabel * titleLabel, * addressLabel; } // other init methods are not shown - (zero) set marker: (MapMarker *) marker {_marker = marker; TitleLabel.text = Marker. Diversity. Name; AddressLabel.text = marker.university.address; [Title labels size tofitt]; TitleLabel.minX = 0; [Title label Remove LayerAll Animation]; If (titleLabel.width> titleView.width) [Running itself]; } - Running Labels {Zero} {CGFloat timeInterval = titleLabel.width / 70; [UIView Chet Realism: Time Lag Delay: 1.0 Option: UIViewAnimationOptionOverrideInheritedDuration | UIViewAnimationOptionRepeat Animation: ^ {titleLabel.minX = -titleLabel.width; } Closing: ^ (BOOL Finish) {titleLabel.minX = titleView.width; [Self floating label]; }]; } @end  

I create assets in my ViewController

  @implementation MapVC {CalloutView * calloutView; }  

And then if I try to create calloutView in any method working properly with all animation, but if I return the view in Google Map method

  - (UIView *) MapView: (GMSMapView *) MapView markerInfoWindow: (GMSMarker *) Marker {if (calloutView) calloutView = [[calloutView alloc] initWithFrame: CGRectMake (0, 0, 265, 45.5)]; CalloutView.marker = (MapMarker *) marker; Return callout view; }  

My animation runs immediately in the calloutView, and is also called immediately complete, and like the runningLabel method again, then it has to do It is not working. All the frames are good, and timInterval is always more than 4 seconds. I tried to write like static timerartle 10.0, but the animation is replayed instantly and always end the flag in the block Yes. So it has been called more than 100 times in a second. I creates an app in 7. I tried to use different options for the animation:

  UIViewAnimationOptionLayoutSubviews UIViewAnimationOptionAllowUserInteraction UIViewAnimationOptionBeginFromCurrentState UIViewAnimationOptionRepeat UIViewAnimationOptionAutoreverse  

What is wrong with this Google Maps method, why my animation runs immediately ?

PS mINX, width -... Set my categories minx frame.origin.x there are good with all the categories here

remove the UIViewAnimationOptionRepeat option or Comment on completion Block minx setting:

  - (zero) running label {CGFloat timeInterval = titleLabel.width / 70; [UIView Chet Realism: Time Lag Delay: 1.0 Option: UIViewAnimationOptionOverrideInheritedDuration | UIViewAnimationOptionRepeat Animation: ^ {titleLabel.minX = -titleLabel.width; } Closing: ^ (BOOL End) {//titleLabel.minX = titleView.width; // If this is the problem, then you should not set up MINX UIViewAnimationOptionRepeat also has animation options, while [self-runningLabel]; }]; }  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -