uiscrollview

iOS - Creating a SpringBoard screen

别来无恙 提交于 2020-01-02 11:05:45
问题 I'm trying so create a collection view that behaves like the iOS springboard screen. That means that I want to have a collection view, with all of my items, and to have a page controller underneath the grid (just like the springboard screen). I also want to implement the same edit mode, meaning that one my icons are in edit mode, I can drag them from one page to another, in such a way that a page doesn't have to be full. I've tried to set a single collection view to scroll horizontally, but

How to constrain UIScrollView to only zoom vertically?

谁说我不能喝 提交于 2020-01-02 06:51:52
问题 I have a UIScrollView which I'm using to represent an axis on a graph. I'd like the user to be able to zoom in on the axis using the usual pinch motion, but for it to only scale in the vertical direction, not horizontally. My question is similar to this one, but I've tried the solution suggested there (overriding the subview's SetTransform method so that it ignores scaling in one direction) and it works perfectly when constraining scaling horizontally, but not vertically. When I try

Is it possible to zoom UICollectionView as a unit?

别说谁变了你拦得住时间么 提交于 2020-01-02 06:20:45
问题 We have a level map view in our latest project. It includes the level markers as UICollectionViewCells and various UICollectionReusableViews for fun decoration. We would like to be able to zoom in / out (it is a big map). I had hoped I could make use of the internal UIScrollView to do so, however, you can't zoom yourself... only a subview. Is there anyway to do this outside of individually scaling and relocating each element as I zoom? Feels like it should be a common thing and thus a more

Is it possible to zoom UICollectionView as a unit?

最后都变了- 提交于 2020-01-02 06:20:13
问题 We have a level map view in our latest project. It includes the level markers as UICollectionViewCells and various UICollectionReusableViews for fun decoration. We would like to be able to zoom in / out (it is a big map). I had hoped I could make use of the internal UIScrollView to do so, however, you can't zoom yourself... only a subview. Is there anyway to do this outside of individually scaling and relocating each element as I zoom? Feels like it should be a common thing and thus a more

Detecting panning + decelerate of MKMapView

狂风中的少年 提交于 2020-01-02 06:16:13
问题 I'm trying to capture panning and the 'end of scrolling' on an MKMapView. Panning is easy to do with a gesture recognizer. However, MKMapView doesn't seem to implement a UIScrollViewDelegate in iOS 6. That makes the solution in Is there way to limit MKMapView maximum zoom level? not work. Thoughts? Ideally I would have just leveraged the UIScrollViewDelegate as such: -(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { if ([super respondsToSelector:@selector

Disable vertical scroll in UIScrollView Swift

大城市里の小女人 提交于 2020-01-02 02:20:12
问题 (Don't mark this question as duplicated. I read a lot of questions but I don't find the answer to my issue.) My issue is the following: I have a UIScrollView which is supposed to only scroll horizontally. Here it scrolls vertically for 20px (strange fact: it appears to be the same height of the status bar). I tried to print the content size, the y offset and the height of the UIScrollView like this: print(horizontalScrollView.contentSize) print(horizontalScrollView.bounds.size.height) print

UIScrollView (paging mode) bounces only when there two or more pages?

余生颓废 提交于 2020-01-01 19:31:33
问题 I just have this strange question. I have a UIScrollView, and I have only one page in that scroll. The scroll is paging enabled and bounce enabled. Here is my code (in iPad) scroll = [[UIScrollView alloc] init]; scroll.pagingEnabled = YES; scroll.showsHorizontalScrollIndicator = NO; scroll.showsVerticalScrollIndicator = NO; scroll.scrollsToTop = NO; scroll.bounces = YES; scroll.delegate = self; CGRect frame = CGRectMake(0.0, 0.0, 768, 1004); scroll.frame = frame; [self.view addSubview:scroll]

Iphone : How to scroll to the 1st cell of the 2nd section, letting the header of the 1st section visible

笑着哭i 提交于 2020-01-01 18:18:27
问题 I have an UITableView with rows and sections. I would like to scroll to the first item of the second section, letting the header of the first section visible. Like if I had manually scrolled the list until reaching that state. ---- TOP OF SCREEN ---- Header of first section Header of the second section cell 1 cell 2 cell 3 Header of the third section cell 1 cell 2 ... scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:1] does not do the job, it hides the header of the first

How to create an timeline on iPhone

人盡茶涼 提交于 2020-01-01 18:04:12
问题 I am trying to create an inifite timeline in my iPhone app to scroll through time. I think I am going to use a UIScrollView to do that but I am not sure how to do that. Am I supposed to create a reusable queue of views from scratch with views containing the days/months/years and reuse them when they go out of the screen ? (I have in mind the reusable cells from the tableviews). Maybe there is a better way to do that ? Thanks for your help ! 回答1: As far as I know, UIScrollView doesn't have

Resizing behavior of UIPopoverController differs between iOS 7.0 and iOS 7.1

百般思念 提交于 2020-01-01 16:56:06
问题 I have a UIPopoverController that contains a UITableViewController within a UINavigationController. Whenever a cell in this table view is pressed, I push yet another UITableViewController to my navigation Controller. I want to set the height of my second table view (let's say to 200) and adjust the size of the popover accordingly. I therefore first set the table view frame in viewDidAppear:(BOOL)animated and then call setPopoverContentSize:(CGSize)size animated:(BOOL)animated . Both heights