uiscrollview

Animate scrolling of UIScrollView with CoreAnimation

本秂侑毒 提交于 2019-12-20 17:40:54
问题 Sorry for a big question, real question are bold in bottom, now some explanation. I'm use CoreAnimation in my project for animate some objects moving like this. CABasicAnimation *moveAnimation; moveAnimation=[CABasicAnimation animationWithKeyPath:@"position"]; moveAnimation.duration = 2.0; moveAnimation.repeatCount=1; moveAnimation.autoreverses=NO; moveAnimation.delegate = self; moveAnimation.fromValue = [NSValue valueWithCGPoint:[crawler.layer position]]; moveAnimation.fillMode =

ScrollView has ambiguous scrollable content height [duplicate]

折月煮酒 提交于 2019-12-20 17:34:28
问题 This question already has answers here : UIScrollView Scrollable Content Size Ambiguity (30 answers) Closed 5 years ago . I am making a very basic UIScrollView test. Here is my setup It shows me the following AutoLayout error: ScrollView has ambiguous scrollable content height 回答1: You need to ensure you've got a chain of vertical spacing constraints from the top of the scroll view through all your elements to the bottom of the scroll view. Once you do that, your warning/error should go away.

ScrollView has ambiguous scrollable content height [duplicate]

和自甴很熟 提交于 2019-12-20 17:32:45
问题 This question already has answers here : UIScrollView Scrollable Content Size Ambiguity (30 answers) Closed 5 years ago . I am making a very basic UIScrollView test. Here is my setup It shows me the following AutoLayout error: ScrollView has ambiguous scrollable content height 回答1: You need to ensure you've got a chain of vertical spacing constraints from the top of the scroll view through all your elements to the bottom of the scroll view. Once you do that, your warning/error should go away.

Add a floating bar to a scroll view like in the Facebook iOS app's timeline

╄→гoц情女王★ 提交于 2019-12-20 17:28:15
问题 I've been playing around with adding different interactions to a test project of mine, and I'm having trouble adding something like Facebook's post status bar, the one that sits on the timeline scrollview and scrolls with the scrollview when you're scrolling down the view but stays stuck under the navbar when you're scrolling up it. I've been creating a separate UIViewController (not UIView) and adding it as a subview to the main ViewController. I'm not exactly too sure where to go from there

IOS: UIScrollView with an infinite paging view

ⅰ亾dé卋堺 提交于 2019-12-20 15:31:56
问题 I have this code for a scrollview to showe 3 images: const CGFloat kScrollObjHeight = 150.0; const CGFloat kScrollObjWidth = 320.0; const NSUInteger kNumImages = 3; - (void)layoutScrollImages { UIImageView *view = nil; NSArray *subviews = [scrollView1 subviews]; // reposition all image subviews in a horizontal serial fashion CGFloat curXLoc = 0; for (view in subviews) { if ([view isKindOfClass:[UIImageView class]] && view.tag > 0) { CGRect frame = view.frame; frame.origin = CGPointMake

Fading out any content which approaches edges of UIScollView

旧城冷巷雨未停 提交于 2019-12-20 12:35:52
问题 As the title says, I am trying to give to some UIImageViews a fading out effect as they get closer and closer to any of the four edges of my UIScrollView. Since the user can drag the UIImages, if he drags them towards the edges, they start fading out, instead of giving that cut out effect as if there were borders to the UIScrollView. I tried this tutorial: http://www.cocoanetics.com/2011/08/adding-fading-gradients-to-uitableview/ suggested in another stack overflow question, but it can only

How do I implement UIPageControl in Swift

徘徊边缘 提交于 2019-12-20 11:29:54
问题 Ok so I'm struggling here and haven't been able to find a working solution. I've been self learning Swift without Objective C experience (I know, I know). In my app, I have my main UIViewController , a subview that is transparent but slides in from the bottom of the screen, and then 4 subviews of the sliding subview that are all working UIScrollViews. I have paging enabled and it works great but I'd like to add a UIPageControl for each of them. I seriously can't grasp delegates and how to

How do I implement UIPageControl in Swift

天大地大妈咪最大 提交于 2019-12-20 11:29:22
问题 Ok so I'm struggling here and haven't been able to find a working solution. I've been self learning Swift without Objective C experience (I know, I know). In my app, I have my main UIViewController , a subview that is transparent but slides in from the bottom of the screen, and then 4 subviews of the sliding subview that are all working UIScrollViews. I have paging enabled and it works great but I'd like to add a UIPageControl for each of them. I seriously can't grasp delegates and how to

UITapGestureRecognizer initWithTarget:action: method to take arguments?

↘锁芯ラ 提交于 2019-12-20 10:59:27
问题 I'm using UITapGestureRecognizer because I'm using a UIScrollView that acts as a container for my UILabel s. Basically I'm trying to use an action method with arguments so I can e.g. send myLabel.tag value to the action method to know what action to take depending on what UILabel has has been triggered by a tap. One way of doing it is having as many action methods as UILabel s but that isn't very "pretty" codewise. What I would like to achieve is just having one action method with switch

UITableView Scrolls to Top on Cell Refresh

懵懂的女人 提交于 2019-12-20 10:37:26
问题 I have a UITableView with a cell that is dynamically sized to fit a UITextView inside it. Whenever a key is typed, the cell checks to see if the calculated height has increased, as with a newline, so it can tell the table the the cell's height needs to be recalculated. I do that with this code. - (void) createNoteCellViewDidUpdate: (CreateNoteCell*) cell { CGFloat newHeight = [self tableView:self.tableView heightForRowAtIndexPath:CreateNoteCellIndexPath]; if (newHeight != CGRectGetHeight(cell