catransaction

CAShapeLayer animation doesn't stay on screen but disappears

别说谁变了你拦得住时间么 提交于 2020-01-30 06:50:07
问题 I'm trying to draw a animated circle but every segment needs to have another color. Now everything works except that my piece that is just drawed before I call the method again disappears so only the last part stays. I don't want that, I want that after 4 times a whole circle is drawn in different color strokes. How can I fix this that it doesn't disappears? This is my init code: - (void)_initCircle { _circle = [CAShapeLayer layer]; _radius = 100; // Make a circular shape _circle.path =

SWIFT: +[CATransaction synchronize] called within transaction while decoding HTML entities

人走茶凉 提交于 2020-01-02 07:15:15
问题 I am making an app that fetches JSON content of a blog. The titles of the blog articles are shown in tableView. The titles fetched were HTML encoded. So I decoded them using this code func configureCell(cell: UITableViewCell, atIndexPath indexPath: NSIndexPath) { let object = self.fetchedResultsController.objectAtIndexPath(indexPath) as NSManagedObject var encodedString = object.valueForKey("title")!.description var encodedData = (encodedString as NSString).dataUsingEncoding

How to slow MKMapCamera movement?

南楼画角 提交于 2019-12-23 05:07:39
问题 I am coding in iOS. I have an NSArray, which contains a few MKMapCameras. I want to display MKMapCameras from the array one after another. I put a while loop and used [self.mapView setCamera:nextCamera animated:YES]; However, this is only showing the first and the last views. Everything in between is going too fast. I want to slow down the movement of each camera. Is there a way to achieve it using CATransaction or using any other animation tricks. If so, could you please show me an example

Move and Rotate GMSMarker smoothly along last updated GPS coordinates Swift iOS

偶尔善良 提交于 2019-12-23 01:11:33
问题 I'm using GMSMapView . So I added custom GMSMarker and set the image(Ex. Bike image) and animating that marker when user starts moving and changing the angle of the marker in locationManager . Currently I'm just updating position attribute of GMSMarker. But it gives the GMSMarker jump effect. Instead of this I want to move and rotate the GMSMarker smoothly/properly into the GMSMapView. How can i achieve this in Swift? Thanks. (void)updateLocationoordinates(CLLocationCoordinate2D) coordinates

Called within transaction When UIsearch Bar clicked and keyboard showed

僤鯓⒐⒋嵵緔 提交于 2019-12-19 05:23:50
问题 I did a ViewController where there is a button and UITextfield when I click the button a UITableViewController with a UISearchBar is presented and a list of languages is displayed. My issue is when I run the app the first time I click the button and then click the UISearchBar on my console I have this warning SearchDebugApp[2237:558457] +[CATransaction synchronize] called within transaction SearchDebugApp[2237:558457] +[CATransaction synchronize] called within transaction SearchDebugApp[2237

Xcode: How to set CA_DEBUG_TRANSACTIONS=1?

南笙酒味 提交于 2019-12-18 14:46:09
问题 I'm getting this warning in the log window of the debugger: CoreAnimation: warning, deleted thread with uncommitted CATransaction; set CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces. I have to find out what code of mine is calling CATransaction so I can make sure it is running on the main thread. My code doesn't call CATransaction directly. I.e. a search of my code for CATransaction turns up nothing. In Xcode 5, what is the correct way to set CA_DEBUG_TRANSACTIONS=1 in the

CoreAnimation warning deleted thread with uncommitted CATransaction

烂漫一生 提交于 2019-12-18 10:46:35
问题 I am having issues with the following warning: CoreAnimation: warning, deleted thread with uncommitted CATransaction; set CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces. I am using an NSOperation object to perform some calculations, once complete it sends a message back to the AppDelegate that then hides a progress bar and unhides some buttons. If I comment out the message back to the AppDelegate the warning goes away but the progress bar obviously remains visible and animated. I am

How to properly animate sequentially using CAAnimation

情到浓时终转凉″ 提交于 2019-12-13 15:53:37
问题 I'm simply closing doors, delaying 2 sec/calling a method then opening them back. One comes from the left side and the other from the right side. I first used UIView animation block but then realized whenever user leaves the app during animation, its completion block would never get called. I could not find anyone complaining about such behavior when interruption happens during animation thus could not solve the problem and now I'm hoping CAAnimation's animationDidStop or CATransaction's

Core Animation Warning: “uncommitted CATransaction”

余生颓废 提交于 2019-12-12 01:34:23
问题 I am getting the following warning with Device only: CoreAnimation: warning, deleted thread with uncommitted CATransaction; created by: 0 QuartzCore 0x3763c65d <redacted> + 220 1 QuartzCore 0x3763c541 <redacted> + 224 2 QuartzCore 0x3763fe2f <redacted> + 30 3 QuartzCore 0x3763b9bf <redacted> + 318 4 QuartzCore 0x3763b87b <redacted> + 50 5 QuartzCore 0x3763b80b <redacted> + 538 6 MyApp 0x000df597 -[CommonClass orangeGradient:] + 382 7 MyApp 0x000f70e1 -[HomeViewController updateStatusBar] +

iOS Core-Animation: Performance issues with CATransaction / Interpolating transform matrices

╄→尐↘猪︶ㄣ 提交于 2019-12-11 14:16:31
问题 I am performance testing my iPhone app: // using CATransaction like this goes from 14fps to 19fps [CATransaction begin]; [CATransaction setDisableActions: YES]; // NEG, as coord system is flipped/messed up self.transform = CGAffineTransformMakeRotation(-thetaWheel); [CATransaction commit]; Question: why does disabling core animation's default behavior of interpolating between the old and the new transform matrix give such a performance boost? What could they possibly be doing that could be so