Unwanted UITableView reload animation when navigating from iOS 11 search controller
Personally, I would simply hide the searchView controller before presenting the new view controller.
( Using UIView.animates with a completion handler for example )
I would not try to investigate further because since iOS11, there is an esoteric problem in the safe area management. A bug ? :)
Even the launch screens layouts are not correctly handled.
So many majors logos miss their middle part at launch !
Unwanted UITableView reload animation when navigating from iOS 11 search controller
Personally, I would simply hide the searchView controller before presenting the new view controller.
( Using UIView.animates with a completion handler for example )
I would not try to investigate further because since iOS11, there is an esoteric problem in the safe area management. A bug ? :)
Even the launch screens layouts are not correctly handled.
So many majors logos miss their middle part at launch !
tableView.reloadData() ends other animations, how to fix it?
You need to use animation block to achieve this one. Try this one :-
UIView.animateWithDuration(0.3, delay: 0,
options: [], animations: {
toDoItems.removeAtIndex(index)
// use the UITableView to animate the removal of this row
tableView.beginUpdates()
let indexPathForRow = NSIndexPath(forRow: index, inSection: 0)
tableView.deleteRowsAtIndexPaths([indexPathForRow], withRowAnimation: .Fade)
tableView.endUpdates()
// refresh gradient effect of rows
}, completion: { _ in
tableView.reloadData()
})
Set duration as you want.( 0.3 or what you want )
Calling tableView.reloadData() removes custom in-cell animation
You do not need to reload the tableview if data on the labels change, just change the text on the labels. You need only to reload the tableview if e.g. the count of rows changes or you need to re-create the cells.
Just get the index paths of the visible rows with tableView.indexPathsForVisibleRows and iterate over the visible cells to change text or background.
Animated reloadData on UITableView
I did category method.
- (void)reloadData:(BOOL)animated
{
[self reloadData];
if (animated) {
CATransition *animation = [CATransition animation];
[animation setType:kCATransitionPush];
[animation setSubtype:kCATransitionFromBottom];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
[animation setFillMode:kCAFillModeBoth];
[animation setDuration:.3];
[[self layer] addAnimation:animation forKey:@"UITableViewReloadDataAnimationKey"];
}
}
Related Topics
Xcode6 Goldmaster Submitting Build Failed with Error
Default Uifont Size and Weight But Also Support Preferredfontfortextstyle
How to Get Path to a Subfolder in Main Bundle
How to Set UIactivityviewcontroller Gmail Share Subject Different Than Body
Why Wkwebview Doesn't Display Videos? - Swift 3
Swiftui: Error in Dragging Logic or Is This a Bug
How to Set Requestserializer in Alamofire
Filter Array of Custom Objects in Swift
Sprite Frame Animation Cocos2D 3.0
Keep a UIview or UIviewcontroller on Top of All Others
View Height Problems (Continued)
Initialization of 'Unsafepointer<Int>' Results in a Dangling Pointer
How to Install Self-Signed Certificates in iOS 11
Track Touch Points in Multitouch
Invalid Transaction Receipt Returned by Appstorereceipturl (Nsdata), in iOS 7
Ld: Library Not Found for -Ldoubleconversion React Native 0.59