uiscrollview

How do I auto size a UIScrollView to fit its content

情到浓时终转凉″ 提交于 2019-12-27 12:09:19
问题 Is there a way to make a UIScrollView auto-adjust to the height (or width) of the content it's scrolling? Something like: [scrollView setContentSize:(CGSizeMake(320, content.height))]; 回答1: The best method I've ever come across to update the content size of a UIScrollView based on its contained subviews: Objective-C CGRect contentRect = CGRectZero; for (UIView *view in self.scrollView.subviews) { contentRect = CGRectUnion(contentRect, view.frame); } self.scrollView.contentSize = contentRect

UIScrollView pauses NSTimer until scrolling finishes

假如想象 提交于 2019-12-27 10:38:55
问题 While a UIScrollView (or a derived class thereof) is scrolling, it seems like all the NSTimers that are running get paused until the scroll is finished. Is there a way to get around this? Threads? A priority setting? Anything? 回答1: An easy & simple to implement solution is to do: NSTimer *timer = [NSTimer timerWithTimeInterval:... target:... selector:.... userInfo:... repeats:...]; [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; 回答2: For anyone using Swift 3 timer =

UIScrollView pauses NSTimer until scrolling finishes

不打扰是莪最后的温柔 提交于 2019-12-27 10:38:22
问题 While a UIScrollView (or a derived class thereof) is scrolling, it seems like all the NSTimers that are running get paused until the scroll is finished. Is there a way to get around this? Threads? A priority setting? Anything? 回答1: An easy & simple to implement solution is to do: NSTimer *timer = [NSTimer timerWithTimeInterval:... target:... selector:.... userInfo:... repeats:...]; [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; 回答2: For anyone using Swift 3 timer =

scrollview not moving [duplicate]

本秂侑毒 提交于 2019-12-27 00:40:52
问题 This question already has answers here : UIScrollView not scrolling (24 answers) UIScrollView not scrolling… (2 answers) Closed 6 years ago . Quite a simple bug. Unable to resolve. I added a scrollview to my application. Next I added a view to this scrollview which is out of scrollview bounds. I was hoping the scrollview would allow my view to be scrolled. but the view is not scrollable. i.e. I added a button to it, to see it is scrolling horizontally. However its not. The kind of

scrollview not moving [duplicate]

£可爱£侵袭症+ 提交于 2019-12-27 00:39:15
问题 This question already has answers here : UIScrollView not scrolling (24 answers) UIScrollView not scrolling… (2 answers) Closed 6 years ago . Quite a simple bug. Unable to resolve. I added a scrollview to my application. Next I added a view to this scrollview which is out of scrollview bounds. I was hoping the scrollview would allow my view to be scrolled. but the view is not scrollable. i.e. I added a button to it, to see it is scrolling horizontally. However its not. The kind of

Adjust the size of UITableView dynamically which would display as a non-scrollable list of content

佐手、 提交于 2019-12-25 16:55:36
问题 I'm working on a project in Swift 3.0 and it has a UITableView inside a UIScrollView that has already been set its constraints. The requirement is to display a list of songs that would return from an array in this UITableView, but the size of this UITableView should dynamically arrange according to the size of the array, so I do not need to scroll the UITableView since I can see all the songs in the UITableView (this UITableView is inside my scrollView, so instead I can use my scrollView do

Adjust the size of UITableView dynamically which would display as a non-scrollable list of content

旧城冷巷雨未停 提交于 2019-12-25 16:55:20
问题 I'm working on a project in Swift 3.0 and it has a UITableView inside a UIScrollView that has already been set its constraints. The requirement is to display a list of songs that would return from an array in this UITableView, but the size of this UITableView should dynamically arrange according to the size of the array, so I do not need to scroll the UITableView since I can see all the songs in the UITableView (this UITableView is inside my scrollView, so instead I can use my scrollView do

Can't get UIScrollView to work

不想你离开。 提交于 2019-12-25 12:27:20
问题 This is a storyboard app. I added a UIScrollView on top of the UIView that is there in the view controller by default. Then I added some UI elements on to the scroll view. After designing the viewable part of the Scroll view, using its handles I stretched it vertically and pushed it up a bit so that that part is visible for me to design the rest of the screen. After I was done I positioned the scroll view back to fit the view. Please note that I did not resize the scroll view to match the

UIPageViewController-PDF Zooming not working xcode?

▼魔方 西西 提交于 2019-12-25 11:57:32
问题 I'm using the the below github project https://github.com/jackhumphries/UIPageViewController-PDF the problem is pdf is loading and page curl effect is working but i can not zoom in and zoom out my pdf document that is loaded i try debuging as well then why its not working but i can not find out the solution and i checked out the PDFScrollView delegate methods they all are implemented but those methods are not calling when i try to zoom in/out . here are these methods : - (UIView *

UIPageViewController-PDF Zooming not working xcode?

元气小坏坏 提交于 2019-12-25 11:57:02
问题 I'm using the the below github project https://github.com/jackhumphries/UIPageViewController-PDF the problem is pdf is loading and page curl effect is working but i can not zoom in and zoom out my pdf document that is loaded i try debuging as well then why its not working but i can not find out the solution and i checked out the PDFScrollView delegate methods they all are implemented but those methods are not calling when i try to zoom in/out . here are these methods : - (UIView *