uiscrollview

Send data and Change Page on button press using UIPageControl

ε祈祈猫儿з 提交于 2019-12-25 02:43:15
问题 I am using UIPageControl and UIScrollView to move between the views by scrolling. I have followed this tutorial. I have a button in the first of the view controllers. I would like to send data to the second view controller and also change the page. I would like to know how it is done. 回答1: You would need to have all of the view controllers created (born at least the first 2) rather than loading purely on demand (scroll). Add a property to the first controller which holds a reference to the

Lazy loading with multiple scrollview and dynamic images

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 02:42:52
问题 I having a hard time with this one and would appreciate any help, my problem is that I'm building a multiple image carousel in a tableview it contains custom cell with scroll view in each of them the scrollview display images from xml fetched thru the internet which means uiimageview is added runtime as a scrollview subview. I want to lazy load these images so it will not take up too much memory. The samples that I've found only uses 1 scrollview and predefined image count. Thanks in advance!

Setting constraints to UIScrollView

柔情痞子 提交于 2019-12-25 02:32:13
问题 Need some help to set constraints to UIScrollView. I tried to follow the instructions here: https://developer.apple.com/library/ios/technotes/tn2154/_index.html (Mixed approach). Setting 4 sided constraints to UIScrollView. Then set 4 sided constraints to the buttonContainer. This the result: However xcode is giving this error message: If I try xcode's recommendation, either the scrollview will not scroll, or it doesn't display at all. Any idea what's wrong here? 回答1: The messages you are

ScrollView issue Swift

孤街浪徒 提交于 2019-12-25 01:49:09
问题 I have a view controller with a inside scrollview , but when I load the view controller the its scrollview isn't start from top but its almost at half screen , like this: The view controller is in pageviewcontroller but I think that its not important. I dont poste the code because I think that its not important in this case , but if its i will post it. I tried to print the contentOffset but I get (0.0, 0.0) 回答1: I had the same issue, And i fixed it by adding one UIView before UIScrollView ...

Need sample code to implement Paging Based UIScrollView

醉酒当歌 提交于 2019-12-25 01:08:03
问题 I am new to iOS development. Can anyone give me a working sample project/ tutorial of paging based scrollview? I need to load more data in my table view from a webservice as user scrolls down. I have spent a lot of time, but could not find anything that suits my need. Any help will be greatly appreciated. I was able to figure out the solution of my problem. Now I am trying to detect scroll up and down based on the y offset difference. The problem is it always reads the drag to be downwards

How to remedy a UINavigationBar overlapping the top of my UIScrollView?

こ雲淡風輕ζ 提交于 2019-12-24 23:26:59
问题 I am working with a TabBarController >> NavBarController UI. One of my UIViewControllers has a UIScrollView in it with some text (UITextField) in it. Problem is, the uppermost text in the UIScrollView is covered by the NavBar. How do I fix this? I am trying to manually adjust stuff in IB with mixed results but I want a more CERTAIN solution. 回答1: The problem is that your view is too big, and it's being positioned under the nav bar. To fix, open up the .xib with your container view and/or your

UIScrollView, sliding, zooming

回眸只為那壹抹淺笑 提交于 2019-12-24 22:33:20
问题 I have an app which has a uiscrollview, which in turn has two uiimageviews. The scrollview works fine in sliding between both imageviews, by making the content size twice the width. like so [self.scrollView setContentSize:CGSizeMake(self.scrollView.frame.size.width * 2, self.scrollView.frame.size.height)]; Now the client wants the user to be able to zoom into any image in those two images. He does not want another modal view with the selected picture zoomed in, but rather on the same

How show tag of button?

馋奶兔 提交于 2019-12-24 20:24:08
问题 In below code i want display tag of each button on console. I tried for that but it show out of scope. How do that? - (void)loadView { [super loadView]; self.view.backgroundColor = [UIColor redColor]; UIScrollView *scroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)]; scroll.pagingEnabled = YES; NSInteger numberOfViews = 33; [btnMenu setTag:0 ]; for (int i = 1; i < numberOfViews; i++) { CGFloat yOrigin = i * self.view.frame

Increasing height of UIView and changing background colour - can't make it work

旧街凉风 提交于 2019-12-24 19:11:21
问题 I've drawn a UIView (scrollInner) in Interface Builder and I now want to increase its height programmatically and also change its background colour. The UIView is inside a UIScrollView , and the scrolling all works fine. Basically, what I'm doing is trying to increase the inner UIView so it matches the contentSize of the UIScrollView . Here's what I've got so far in my viewDidAppear method: CGRect scrollInnerRect = self.scrollInner.frame; scrollInnerRect.size.height = 1000; self.scrollInner

iOS nested scrollview — keep scrolling past top into superview?

五迷三道 提交于 2019-12-24 19:02:02
问题 So I have a table view with several cells, the last of which is a tableview itself. When I Scroll the parent table view to the bottom, I Would like the nested tableview to continue scrolling. Essentially, when I get to the end of the parent view, I'd like it to transfer the scroll velocity to the nested view. And also, if a user is dragging the scroll view, when it reaches the end it would begin dragging the nested view. Any tips on transferring scroll events to nested UITableViews