uiscrollview

UIScrollView paging enabled with content inset is working strange

一世执手 提交于 2019-12-31 21:44:13
问题 I created the UIScrollView with content insets. scrollView.frame = CGRectMake(-80, 180, 480, 190) self.scrollView.contentInset = UIEdgeInsetsMake(0, 160, 0, 160); self.scrollView.pagingEnabled = YES; [self.scrollView setContentSize:CGSizeMake(480, 190)]; // Add three Views [self.scrollView addSubview:view1]; [self.scrollView addSubview:view2]; [self.scrollView addSubview:view3]; [view1 setFrame:CGRectMake(0, 0, 160, 190)]; [view2 setFrame:CGRectMake(160, 0, 160, 190)]; [view3 setFrame

How to scroll UICollectionViewCell programmatically in IOS?

本秂侑毒 提交于 2019-12-31 16:11:14
问题 I have a vertical UICollectionView with each cell taking up the entire self.view.frame I can easily swipe upwards to page to the next cell, but I would like to do the same thing with the press of a button. I've tried using: - (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated And: - (void)scrollRectToVisible:(CGRect)rect animated:(BOOL)animated They work but they temporarily "White-Out" the currentCell to present the nextCell, while the swiping shows both cells during the

How to scroll UICollectionViewCell programmatically in IOS?

删除回忆录丶 提交于 2019-12-31 16:11:04
问题 I have a vertical UICollectionView with each cell taking up the entire self.view.frame I can easily swipe upwards to page to the next cell, but I would like to do the same thing with the press of a button. I've tried using: - (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated And: - (void)scrollRectToVisible:(CGRect)rect animated:(BOOL)animated They work but they temporarily "White-Out" the currentCell to present the nextCell, while the swiping shows both cells during the

How to I rotate UIImageView by 90 degrees inside a UIScrollView with correct image size and scrolling?

那年仲夏 提交于 2019-12-31 10:37:11
问题 I have an image inside an UIImageView which is within a UIScrollView. What I want to do is rotate this image 90 degrees so that it is in landscape by default, and set the initial zoom of the image so that the entire image fits into the scrollview and then allow it to be zoomed up to 100% and back down to minimum zoom again. This is what I have so far: self.imageView.transform = CGAffineTransformMakeRotation(-M_PI/2); float minimumScale = scrollView.frame.size.width / self.imageView.frame.size

How to I rotate UIImageView by 90 degrees inside a UIScrollView with correct image size and scrolling?

夙愿已清 提交于 2019-12-31 10:37:05
问题 I have an image inside an UIImageView which is within a UIScrollView. What I want to do is rotate this image 90 degrees so that it is in landscape by default, and set the initial zoom of the image so that the entire image fits into the scrollview and then allow it to be zoomed up to 100% and back down to minimum zoom again. This is what I have so far: self.imageView.transform = CGAffineTransformMakeRotation(-M_PI/2); float minimumScale = scrollView.frame.size.width / self.imageView.frame.size

Twitter-Like Scrolling Title

▼魔方 西西 提交于 2019-12-31 10:03:33
问题 On the Twitter iOS app when you scroll past your name in the profile section below the navigation bar, your name begins to scroll into view on the navigation bar itself and sticks there if you scroll further down. I'm wondering how to go about implementing a similar effect and what the best method would be. It looks as if: - (void)scrollViewDidScroll:(UIScrollView *)scrollView Might be a good bet, but not entirely sure how to make it scroll into view rather than simply animating it when

Twitter-Like Scrolling Title

岁酱吖の 提交于 2019-12-31 10:02:44
问题 On the Twitter iOS app when you scroll past your name in the profile section below the navigation bar, your name begins to scroll into view on the navigation bar itself and sticks there if you scroll further down. I'm wondering how to go about implementing a similar effect and what the best method would be. It looks as if: - (void)scrollViewDidScroll:(UIScrollView *)scrollView Might be a good bet, but not entirely sure how to make it scroll into view rather than simply animating it when

UICollectionView effective drag and drop

可紊 提交于 2019-12-31 08:04:31
问题 I am currently trying to implement the UITableView reordering behavior using UICollectionView. Let's call a UItableView TV and a UICollectionView CV (to clarify the following explanation) I am basically trying to reproduce the drag&drop of the TV, but I am not using the edit mode, the cell is ready to be moved as soon as the long press gesture is triggered. It works prefectly, I am using the move method of the CV, everything is fine. I update the contentOffset property of the CV to handle the

Swift 2.0, SpriteKit - Scrollview to not use pages.

谁说我不能喝 提交于 2019-12-31 05:16:08
问题 Ok so I have a scrollView which has been subclassed to be able to be applied to any scene which is from a previous question I asked here: SpriteKit, Swift 2.0 - ScrollView in reverse import Foundation import SpriteKit /// Nodes touched var nodesTouched: [AnyObject] = [] // global /// Scroll direction enum ScrollDirection: Int { case None = 0 case Vertical case Horizontal } class CustomScrollView: UIScrollView { // MARK: - Static Properties /// Touches allowed static var disabledTouches =

Swift 2.0, SpriteKit - Scrollview to not use pages.

随声附和 提交于 2019-12-31 05:16:05
问题 Ok so I have a scrollView which has been subclassed to be able to be applied to any scene which is from a previous question I asked here: SpriteKit, Swift 2.0 - ScrollView in reverse import Foundation import SpriteKit /// Nodes touched var nodesTouched: [AnyObject] = [] // global /// Scroll direction enum ScrollDirection: Int { case None = 0 case Vertical case Horizontal } class CustomScrollView: UIScrollView { // MARK: - Static Properties /// Touches allowed static var disabledTouches =