uiscrollview

Disable UIScrollView scrolling when UITextField becomes first responder

淺唱寂寞╮ 提交于 2020-01-08 13:54:26
问题 When a UITextField , embedded in a UIScrollView becomes first responder, by lets say the user typing in some character, the UIScrollView scrolls to that Field automatically, is there any way to disable that? Duplicate rdar://16538222 over 回答1: Building on Moshe's answer... Subclass UIScrollView and override the following method: - (void)scrollRectToVisible:(CGRect)rect animated:(BOOL)animated Leave it empty. Job done! 回答2: I've been struggling with the same problem, and at last I've found a

Nested UIScrollviews, how to make one zoom out whilst the other zooms in at the same time?

。_饼干妹妹 提交于 2020-01-07 04:57:06
问题 I am trying to figure out how to achieve this. I want to have a view centred on the screen that can be pinched for zoom in and zoom out but also be panned across the screen. One way I thought of trying to replicate this was to have a UIView within UIScrollView. Let's say the UIView is just a black square. The UIView will be the same size as the UIScrollView and always remain centred. When I pinch the UIView to zoom out, as it gets smaller and the UIScrollView will zoom in at the same rate.

IOS Swift beginner [closed]

雨燕双飞 提交于 2020-01-07 02:58:05
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago . In a screen, view-scrollview-contentview, there are a lot of textfields in the contentview so I use a scrollview to make them in one screen.Now the problem is I could not click or type in the textfield because I know the scrollview has covered the contentview. But I want to type in the textfield

Making an Expanding Scrollview

て烟熏妆下的殇ゞ 提交于 2020-01-06 22:47:32
问题 I'm currently making a drawing application in Swift, but I wanted the page to be able to expand if the user wanted more room. I figured that I would use a UIScrollView to scroll around the canvas, but I wanted it to expand whenever the user went to the edge of the page, and for the UIImageView that I am drawing on to expand with it. Does anyone know how I would go about doing this? Thanks! 回答1: In storyboard, drag a UIView into your UIScrollView then constrain that view to all sides of the

Making an Expanding Scrollview

独自空忆成欢 提交于 2020-01-06 22:46:35
问题 I'm currently making a drawing application in Swift, but I wanted the page to be able to expand if the user wanted more room. I figured that I would use a UIScrollView to scroll around the canvas, but I wanted it to expand whenever the user went to the edge of the page, and for the UIImageView that I am drawing on to expand with it. Does anyone know how I would go about doing this? Thanks! 回答1: In storyboard, drag a UIView into your UIScrollView then constrain that view to all sides of the

UIScrollView inside a UITableViewCell - horizontal scrolling

倖福魔咒の 提交于 2020-01-06 12:42:11
问题 I have been trying to set up a UIScrollView within a custom UITableViewCell . I have tried adding a UIScrollView within the custom .xib file, subclassing it and also manually adding it as a subview to the UITableViewCell in the cellForRowAtIndexPath method. In all these, I have set the contentSize of the UIScrollView within cellForRowAtIndexPath . But regardless of the approach, I have been unable to make it scroll horizontally. Here is some code to give you an idea. - (UITableViewCell *

UIScrollView inside UITableViewCell With horizontal Paging on IPad

旧时模样 提交于 2020-01-06 11:54:11
问题 i am trying to make tableview with custom cell . every cell have uiscrollview inside it and page control .. how can i do that ?? any idea ? thx in advance. this video may help Press Here 回答1: Put a UIScrollView on your tableViewCell.contentView and enable paging. 来源: https://stackoverflow.com/questions/11879310/uiscrollview-inside-uitableviewcell-with-horizontal-paging-on-ipad

Going crazy with UIScrollView and storyboard constraints

∥☆過路亽.° 提交于 2020-01-06 08:56:13
问题 I'm literally going crazy trying to manage a UIScrollView content size programatically. I have a scroll view with another view inside and I need to enlarge this last one and then adapt the scroll view content. Here the extension I'm using for adapt the scroll view content size extension UIScrollView { func updateContentView() { contentSize.height = subviews.sorted(by: { $0.frame.maxY < $1.frame.maxY }).last?.frame.maxY ?? contentSize.height } } I followed a lot of tutorials in order to try to

how to check if the class is created by user of it is a class provided in pobjective-c API

久未见 提交于 2020-01-06 08:11:28
问题 i have a user-defined class of type CircularDynamicUIView. it is in an array the encompass several views like 'buttonviews, uiimageviews,scrollviews and others. how to programmatically within a loop to detect this user-defined class. for example: using if-statement how to check if this class is the class created or developed by the user and not the one that already created by objective-c. 回答1: As @rmaddy noted in comments, you cannot explicitly differentiate between, for example, your custom

UIScrollView doesn't scroll in the right direction

一世执手 提交于 2020-01-06 07:43:27
问题 I got a weird bug. I have a UIViewController with a UIScrollView embedded inside the UIView. Inside the UIScrollview are few images, but I need more space, so I want to put some images under the current ones. I did all the usual stuff to create and initialize my ScrollView, but instead of scrolling in the UP/DOWN direction, it scrolls LEFT/RIGHT … What is going on? I declared "UIScrollViewDelegate" in the .h My property @property (weak, nonatomic) IBOutlet UIScrollView *scrollViewContent; is