uiscrollview

iPhone: Stop UIScrollView from auto scrolling when UITextView text is changed

喜夏-厌秋 提交于 2019-12-12 13:17:50
问题 Hi I have several UITextView's inside a UIScrollView. After a certain action occurs, I change the text of all the UITextView's using [info setText:@"blahblah"], then I modify each TextView's frame so that all the text is viewable. Then I change the content size of the UIScrollView so that it fits all the text. The problem is that after I do this it scrolls when I would like for it to stay at the top of the screen. [scrollView setContentOffset:CGPointMake(0,0) animated:YES]; doesn't seem to

UIScrollView do not scroll

守給你的承諾、 提交于 2019-12-12 11:56:51
问题 I have a UIScrollView that do not scroll at all. If I enable bouncing, I can scroll far enough to the sides to see that there is content outside of the view, but it snaps right back to the origin when I release. I have paging turned on, but I get the same behavior if I turn it off. I have auto layout turned off. In the IB, the scrollView is in a MainViewController, correctly linked up to the IBOutlet as below. @interface MainViewController () @property (strong, nonatomic) IBOutlet

UITextView in UIScrollView using auto layout

杀马特。学长 韩版系。学妹 提交于 2019-12-12 11:10:37
问题 I have a scrollView, which has two subViews: an imageView and a textView. When there is a small text in the textView everything is fine,but , when the content of textView is too big for the height of textView, it doesn't expands the boundaries. Instead of this, it offers me to scroll the textView. But i want to scroll only the scrollView.So how can i make textView resize automatically? I know how to do it without auto layout, but i want to know how to do it with auto layout; 回答1: Update: My

UIScrollView setZoomScale sets the applied rotation back to Zero

烈酒焚心 提交于 2019-12-12 10:46:44
问题 I've been working on a maps replacement for quite a while now. The whole thing works with a UIScrollView backed by a CATiledLayer . To rotate my map, i rotate the layer itself. (Using CATransform3DMakeRotation ) Works pretty well so far =) But if I ever call setZoomScale method the CATransform3D that is going to be submitted to my layer is resetting the rotation to 0. My question is, is there any way to set the zoomscale of my scrollView without loosing the applied rotation? The same problem

iOS : Scroll view works only after keyboard appears

风格不统一 提交于 2019-12-12 10:45:59
问题 I made the scroll view with lots of text fields in it. I added the updated TPKeyBoardAvoidingScrollView and added it in the scroll view's file owner. I added the outlet in .h file, synthesized in .m file and added the line [self.view addSubview:scrollObject]; The issue is the view starts scrolling only after keyboard appears. It does not scroll as soon as the view is loaded. Any solution for this? Adding these lines did not solve my query scrollViewObj = [[UIScrollView alloc] init]; self

Disabling bounces in uitableview also disables scrolling on iOS 5 but not iOS4

大兔子大兔子 提交于 2019-12-12 10:44:41
问题 I have an app with a table view in a nav controller; I wanted to disable bouncing so that when my table is in Edit mode, user can scroll down and find rows to delete; otherwise, it would bounce back and not give them the opportunity to press the delete icon next to the row. So I did this: self.tableView.bounces=NO; When I run my app on iOS 4, this works like a charm. User can scroll and the table does not bounce back. But on iOS 5, the scrolling is also not working at all for the table. No

Force uiscrollview to bounce scrolling even with a single item

血红的双手。 提交于 2019-12-12 10:33:28
问题 I have a UIScrollView with varying numbers of items/subviews. When there is more than one item, scrolling bounce works. However, there are times when the scrollview should only have one item, and I would like to provide the feedback to the user that their scrolls are being recognized--thus the bounce effect. However, UIScrollView disables scrolling with just one item. 回答1: Answer: set alwaysBounceHorizontal or alwaysBounceVertical to true. I answered my own question while writing this up and

UITableView in UIScrollview scrolling delay

[亡魂溺海] 提交于 2019-12-12 10:26:29
问题 I have a UIScrollView and I am adding many viewcontrollers having UITableView in it on that scrollview ,Actually my requirement is that when I scroll horizontally on screen it will switch to next content.Now when I scroll the table vertically and then swipe horizontally it does not scroll horizontally until table stops scrolling vertically. Please help if you have any suggestion 回答1: You could use UIScrollViewDelegate methods. E.g. scrollViewDidEndDecelerating: and scrollViewDidEndDragging

ios - horizontally scrolling collectionView with images

倾然丶 夕夏残阳落幕 提交于 2019-12-12 10:20:49
问题 I am trying to show images on collectionView. I have trouble showing this images as I have created a reusable cell with imageView inside.Those images have to be equally spaced between as I want to show 3 icons on screen at once. I am using 13 icons and it has to be scrollable horizontally through screen. I am not able to show image in cell and I do not know how to set image cells with spacing between them using just one reusable cell CustomCollectionViewCell.h @interface

Custom UIScrollView Animation

你说的曾经没有我的故事 提交于 2019-12-12 09:51:47
问题 I am using a UIScrollView with a list of buttons made to look much like a UIPickerView. I have just implemented shake to shuffle, where upon detection of a shake I set the content offset of the UIScrollView to the position of the randomShuffle using the following. [Singlescroll setContentOffset:CGPointMake(jumpX, jumpY+randShuffle*sepValue) animated:YES]; Instead of just moving the content offset to the random position that matches a button I would like to implement a shuffle animation where