The effect
Yes, it’s a simple drop-down to load more
implementation
Here’s the answer
Simple point is, the use of rotating CGAffineTransformMakeRotation
- Under the rotation
UICollectionView
,UICollectionViewCell
And scroll bars
// The same goes for UITableView
collectionView.transform = CGAffineTransformMakeRotation(-M_PI);
collectionView.scrollIndicatorInsets = UIEdgeInsetsMake(0.0.0.0.0.0, collectionView.bounds.size.width - 8.0);// 8 is the width of the scroll bar
Copy the code
- A little bit different from the original answer, use
IGListKit
Must be created beforeCell
When rotated, otherwise the latest piece of data is always not rotated, but usedUITableView
There is no such problem
// create from Xib or Storyboard
- (void)awakeFromNib{
[super awakeFromNib];
self.contentView.transform = CGAffineTransformMakeRotation(-M_PI);
}
// Create it manually
- (instancetype)initWithFrame:(CGRect)frame{
if (self = [super initWithFrame:frame]) {
self.contentView.transform = CGAffineTransformMakeRotation(-M_PI);
}
return self;
}
Copy the code
- After rotation, drop down refresh is used
MJRefreshAutoNormalFooter
(Because it was rotated 180 degrees) - And finally, refresh, use
IGListKit
Local refresh can be done if usedreloadData
It jumps because it refreshes the whole list.
Well, the only thing I’m not familiar with is probably IGListKit, but as smart as you are, this IGListKit tutorial is not going to happen in a minute.
detour
At Baidu, you can only search for the same scrollRectToVisible, scrollToItemAtIndexPath. I’m not very smart, I’ve tried it all, I can jump, and it’s complicated.
I didn’t know how to search iOS TableView Reverse when I found it
practice
This is the demo THAT I wrote