Anybody having issues tapping on cells where a lot of cells exist? I keep getting the error "Failed to get refreshed snapshot".
I tried using the recorder but that also seems to freeze. I assume it's trying to cache all the cells in the view.
Example: I have cells for each day on a calendar with accessibilityIdentifiers. I have no problems tapping on the cells using the Identifiers with KIF.
Yes, i have. Its about 1 error of 100 tests. Maybe is an apple bug: https://forums.developer.apple.com/thread/6437. I don't know any workarounds :(
A work around would be to tap screen coordinates as mentioned by taylesworth on Apple Developer Forums
Example:
let coordinate = cell.coordinateWithNormalizedOffset(CGVector(0.5, 0.5))
coordinate.tap()
Related
Hello as you can see in the video link below when I reload the data, for a frame something happens and some ghost cells appear and disappear, it's like a weird animation... Is it because of using reusable cells? and if it is, is it preventable cause that's not so pretty and it seems to cause a bit of frame drop with use of CATransition animation (not shown in the video). Any help would be appreciated.
Google Drive Link
Video Youtube Link
* EDIT *
Seems the video is not processed by google drive, sorry you gotta download it first to watch it.
Added Youtube link for convenience
Ok I Found the answer myself thanks to all the unnecessary downvotes:
The first solution was to use
collectionView.reloadItems(at: collectionView.indexPathsForVisibleItems)
but that still caused some problem and flicker stuff.
Some other said to use layoutIfNeeded() after that, yet that did not help.
The Solution I Found was to use func reloadSections(_ sections: IndexSet)
so when I use collectionView.reloadSections(IndexSet(integer:0)) (in my case it is the first section) The animation will happen smooth and perfect.
I'm posting here because I'm completely lost on this one.
I've searched all over the web, tried a lot of things myself, and searched weeks on this bug, but I can't find it.
So ever since iOS 11 (doesn't happen on iOS 10), everytime I press a button that activates the "show" segue in a UINavigationController the animation shows some weird padding at the top.
This padding disappears when the animation is finished.
I've changed the backgroundcolor of the superview to a red color, and the space you can see is indeed from the superview itself, so my guess is the whole UITableView is being moved down for some reason, although I'm not sure what exactly is the cause here.
(I'm using storyboard and AutoLayout constraints)
Another thing I noticed is that the spacing/padding you see is different on the iPhone X compared to the other devices (my guess is that it's the same height as the (non)safe area at the top? Again, not sure.
I don't think code is necessary to be provided here, as I wouldn't really know which part causes this behaviour (and there's a lot of code that I can't share for reasons..).
Any suggestions/help on how to fix this would be deeply appreciated!
Here are some examples:
iPhone X running iOS 11.1 (also happened on 11.0)
iPhone 8 gif
EDIT: I should add, some things I already tried:
tableView.contentInsetAdjustmentBehavior = .never
Setting headerviews to 0
tableView.setContentOffset(0, animated: false)
Playing with the translucency settings of the UINavigationBar
AutomaticallyAdjustContentInsets is set to false
So, as suggested by Spenser-Arn, I played around with the constraints and the Safe Areas, turns out, the safe areas where the cause of the issue.
Hope this helps other people as much as it helped me, and a big thankyou to Spenser-Arn!
I am testing my app with the UI Automated Testing framework. I have a UIACollectionView I would like to pull down or drag my CollectionView. I already tried the ways from the documentation:
to drag up
target.dragInsideWithOptions({startOffset:{x:0.5, y:0.9}, endOffset:{x:0.5, y:0.2}, duration:2.0});
or to pull down:
target.dragInsideWithOptions({startOffset:{x:0.5, y:0.3}, endOffset:{x:0.5, y:0.8}, duration:2.0});
when this didnt work I tried to use the inheritated methods of the UIAScrollView. chatList is my UIACollectionView
archivedChatCell = chatList.cells()["Noise"]
archivedChatCell.scrollToElementWithValueForKey(1, "isVisible")
chatList.scrollDown()
chatList.scrollToElementWithPredicate("Noise")
But nothing is moving in the screen. I read in some threads that this (dragInsideWithOptions) is a Apple problem that needs to be fixed for the iOS7 UI Testing.
Does someone have any idea what the problem is? Am I missing something or is there a work around for that?
The weird thing is, I am using the same code in a different CollectionView in my App, the dragInsideWithOptions works fine and drags or pulls the screen.
thank you
Yes, dragInsideWithOptions and flickInsideWithOptions are not working on the simulator. However, they do work on a real device. Therefore, my suggestion is to use a real device until Apple fixes the problem.
I have been working on an app that uses UIDynamics in UICollectionView. I have watched Apple WWDC video and have also tried this sample app in Github.
However, I had this weird problem: When my app launches, I set the number of items for my collection view to 0, the app needs to download something from the server then populate the collection view on the main thread. Weirdly, it's (kinda) reloaded, but not showing anything. I tried on the sample app from Github and it has the same issue as well.
However, if I remove this part:
- (NSArray *)layoutAttributesForElementsInRect:(CGRect)rect{
return [self.dynamicAnimator itemsInRect:rect];
}
The CollectionView will show what I want but without the UIDynamics.
I hope the illustration on my problem is easy to understand. Any help will be much appreciated. My guess is I shouldn't use reloaddata.
I have a UITableViewController that is populated with several cells, each with its own UITextView that displays a given string from an array. About one time in twenty, opening the UITableViewController causes a crash with the following message in the console:
assertion on
/SourceCache/MobileDataDetectorsCore_Sim/MobileDataDetectorsCore-355/Sources/PushDown/DDTokenCache.c:360
"delta >= 0" failed :Bad shift in DDTokenCacheMoveStreamOffset,
aborting
The only other reference to a similar problem is this, but my TextViews don't have long links in them-- they do have data detectors enabled for links and phone numbers, but few of the TextViews have either.
What should I do to fix this? And can it be done without removing the data detectors?
I'm only getting this in the simulator and not on the device itself.. I believe it is a bug.