uiscrollview

App crashes when tab bar item is selected

空扰寡人 提交于 2019-12-11 12:57:09
问题 I have a tab bar item with a UIScrollView and all the code works. I link the UIScrollView IBOutlet in IB to a UIScrollView I placed in my View. When I run the app and select the tab bar item I get the following error. Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key scrollView.' I have no idea what this is. When I disconnect the ScrollView IBOutlet, then there is no crash. Thanks

Issue with row selection UITableView inside UIScrollView

泪湿孤枕 提交于 2019-12-11 12:25:52
问题 I have a view controller with following layout: Container View UIScrollView UITableView as a sub view of a UIScrollView I have another UITableViewController in which I have a few rows and some methods when the row gets selected. Now I want to display this UITableview inside the UIScrollView . So I add the UITableView as a subview of UIScrollView . The table is displayed in the scroll view just fine, but when I tap in the scroll view to select the table's row, then row is being highlighted but

UIStackView within UIScrollView is cut off

雨燕双飞 提交于 2019-12-11 12:09:48
问题 I'm trying to use a UIStackView within a UIScrollView and I was hoping someone could point me in the right direction in creating the right constraints because I can't figure out what the problem is. These are my constraints and ViewController structure. So DestCont is a UIView that has a fixed height and ContentCont should take up the rest of the space, which could be (and is) larger than the screen so it should be able to scroll. When I test it out in the simulator, I have the following

Trouble with UIScrollView and Constraints

▼魔方 西西 提交于 2019-12-11 11:47:48
问题 I'm having trouble with UIScrollView and Constraints . I want to display a FAQ inside my application. This will include several questions and answers, with various length. It won't change after launch, so I handle everything directly in the storyboard. However, it has to work on different iPhone screen size (from iPhone 5 to iPhone 6 Plus). So what I'm trying to do is : UIView UIScrollView UIView (FAQ1) UILabel (Question 1) UITextView (Answer 1) UIView (FAQ2) UILabel (Question 2) UITextView

How much a UIScrollView has been scrolled inside a UIPageViewController?

醉酒当歌 提交于 2019-12-11 11:20:07
问题 I'm trying to figure out how much of the scroll view inside my UIPageViewController has been scrolled. I have the following code in the viewLoad that access the UIScrollView from UIPageViewController . for (UIView *view in self.pageViewController.view.subviews) { if ([view isKindOfClass:[UIScrollView class]]) { thisControl = (UIScrollView *)view; } } So once I have the UIScrollView, called thisControl I would like to print how much has been scrolled by doing something like this: NSLog (@

Changing the alpha inside UIScrollView

点点圈 提交于 2019-12-11 11:16:46
问题 I was trying to achieve the effect of having my text fade in and out to show there is more data in the UIScrollView in this post: UIScrollView, showing that there is more data by fading out text I could not get the CAGradientLayer to look right since my background isn't a simple black and white background and I couldn't get it to match and make it look like the text is fading. So I thought I'd try setting the alpha property inside the UIScrollView, or the UILabel's alpha inside the

iOS: setContentSize is causing my entire UIScrollView frame to jump

主宰稳场 提交于 2019-12-11 11:15:41
问题 There is probably a simple solution to this problem that I'm missing, but I can't seem to find the cause. Problem: Every time I call setContentSize on my scroll view, it causes the entire scrollview frame to shift. Question: Why does its position reset every time setContentSize is called? and how do I get it to stop? Notes: The contentOffSet within the Scrollview is fine. It's the entire scrollview frame that jumps to its original position. The scroll view is meant to move up and down with a

Swift: How to enable pinch-to-zoom for CALayer?

半城伤御伤魂 提交于 2019-12-11 11:03:31
问题 I have been trying to scroll and zoom a CALayer, specifically a CAShapeLayer, of several polygon paths. I added the CALayer to a UIScrollView which has successfully enabled scrolling around the CALayer. However, pinch to zoom is not working. Several tutorials have implemented zooming a UIImageView with the UIScrollViewDelegate essentially like so: @IBOutlet var scrollView : UIScrollView! var imageView = UIImageView() scrollView.addSubview(imageView) func viewForZoomingInScrollView(scrollView:

UIScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset: warning

别来无恙 提交于 2019-12-11 11:00:04
问题 I have two UITableViews on one view controller (view controller is their delegate). One of them will be depending on scrollViewWillEndDragging:withVelocity:targetContentOffset: (I want to do some kind of custom pagination). The other one have pagingEnabled property set to YES and when I try to scroll it for the first time XCode gives me warning 2012-09-07 16:46:39.672 test[17393:707] Stop offset can not be modified for paging scroll views even though the code of the method is at the moment: -

guide for UIScrollView and autolayout

那年仲夏 提交于 2019-12-11 09:59:44
问题 I am struggling with UIScrollView and AutoLayout. I read a blog and tried to do my own stuff. However, Xcode is reporting ambiguous content size. I setup the scrollview and leading, trailing, top, bottom constraints to 0 from super view. There is a UIView as container to hold all of my sub views, including two UILabel elements and two UICollectionView views. I set the container view as equal width and equal height with the View controller's view. Then I set the UILabel and UICollectionView