uiscrollview

Capturing UIScrollView off screen content

若如初见. 提交于 2019-12-22 06:18:52
问题 I'm working with a UIScrollView which can be used in either orientation and contains a number of subviews: // in viewDidLoad mainScrollView = (UIScrollView *)self.view; mainScrollView.contentSize = CGSizeMake(1024, 1432); I'm trying to capture a screen shot of the entire scroll view with all its subviews, including what is not currently visible on screen. The following captures only what is visible on screen at the time of capture: // make screenshot UIGraphicsBeginImageContext(mainScrollView

UIScrollView with background image

a 夏天 提交于 2019-12-22 06:11:24
问题 I want to have a background image behind a UIScrollView area. That part's easy. The issue I'm running into is I don't want the image to move. I want it to fill the screen and then the scrolling just happens over that without effecting the image in anyway. I've looked through lots of other postings on similar topics, but can't seem to get anything to work. When I do the following, the background scrolls: CGRect fullScreenRect = [[UIScreen mainScreen] applicationFrame]; UISCrollView *scrollView

UIScrollView with background image

自古美人都是妖i 提交于 2019-12-22 06:10:05
问题 I want to have a background image behind a UIScrollView area. That part's easy. The issue I'm running into is I don't want the image to move. I want it to fill the screen and then the scrolling just happens over that without effecting the image in anyway. I've looked through lots of other postings on similar topics, but can't seem to get anything to work. When I do the following, the background scrolls: CGRect fullScreenRect = [[UIScreen mainScreen] applicationFrame]; UISCrollView *scrollView

UITableView's, UIWebViews and the scrollsToTop Property = Trouble

筅森魡賤 提交于 2019-12-22 05:49:11
问题 My app has a UITableView . That UITableView has a header view, which is a UIWebView . By default, scroll views have their scrollsToTop property set to YES , which will enable the user to tap the status bar to scroll to the top of the scroll view. When there are two scroll views embedded in one view, that both have their scrollsToTop property set to YES , tapping the status bar does nothing. The solution is to set one of the scrollsToTop properties to NO . That re-enables tapping the status

Passing swipe touches from UIView to underlying UIScrollView for proper scrolling

梦想与她 提交于 2019-12-22 05:35:18
问题 I have a situation similar to these two posts (1907297 AND 689684) and to describe my situation most concisely, I present this text/graphical layout (similar to what you'd see in IB, dots used to enforce indent levels) UIView (MainView: 320x460) . .UIScrollView (ScrollView: 320x460) . .UIView (OverlayView: 320x40) . . . .UIButton (ArbitraryButton1) . . . .UILabel (ArbitraryLabel1) . . . .UILabel (ArbitraryLabel2) The goal here is for the OverlayView to serve as a unified, transparent

Continuous scrolling between UIPanGestureRecognizer and re-enabled UIScrollView

一个人想着一个人 提交于 2019-12-22 03:24:33
问题 I've got a UIScrollView with paging enabled, and I've added my own UIPanGestureRegonizer to it. Under certain instances, my view controller will set scrollview.scrollEnabled = NO , and then add the pan gesture recognizer to it (I'm not using the scrollview's own recognizer). So, scrolling is disabled but I'm waiting for user touches from my gesture recognizer. When it recognizes, it calls its action in which I re-enable scrolling. The problem is, while the user still has a finger down, my

Programmatically Control UIScrollView

為{幸葍}努か 提交于 2019-12-22 01:36:36
问题 Is there a method of programmatically controlling a UIScrollView? As in, getting a value for its location, so how far along it is scrolled and things and change its position, scroll it programmatically? 回答1: I don't know what either of @Alexandergre or @JAgostoni are talking about. Scrolling in UIScrollView is really easy. I suggest you take a look at the documentation for UIScrollView: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIScrollView_Class/Reference

Objective-C : UIScrollView manual paging

跟風遠走 提交于 2019-12-21 23:08:13
问题 I want to use the scrollview as something like a picker in horizontal mode. The scrollview holds up to seven subviews. Each subview represents a value. Always three views are visible and the one in the middle is the selected one. Scrollview visible at start: __ | V1 | V2 Scrollview set to view/value two: V1 | V2 | V3 Scrollview set to last value: V2 | V3 | __ The real problem I have got is the "pagingEnabled" flag. If pagingEnabled is set to YES the scrollview pages always three subviews

UIButton stops UIScrollView scrolling in Swift

冷暖自知 提交于 2019-12-21 22:42:11
问题 My UIScrollView area is scrolling perfectly except when the user presses on one of the buttons: var button:UIButton = UIButton.buttonWithType(UIButtonType.Custom) as UIButton button.frame = CGRectMake(0,0,self.width, self.menuHeight) button.addTarget(self, action: "buttonClicked:", forControlEvents: UIControlEvents.TouchUpInside) button.tag = Int(itemNo) scrollView.addSubview(button) and the buttonClicked code: func buttonClicked(sender:UIButton) { var tag = sender.tag println(tag) } It seems

Using UIScrollView, when Zooming Out, how can I keep the content view at the center?

北城以北 提交于 2019-12-21 20:56:11
问题 The minimum scale is 0.5 The maximum scale is 2.0 I need to always use larger contentSize for UIScrollView to be able to drag around the content. So, as the CGRect of the content is changing, contentSize of UIScrollView is also changing. However, as I zoom out, if the scale is going below 1.0, contentOffset is abruptly changed to {0.0, 0.0}, making it very difficult to resize the content while keep it's position to the overlay view (e.g. a clothe image). In other words, I can't make the