uiscrollview

UITablewView stops renderings during scrolling

社会主义新天地 提交于 2019-12-14 02:22:00
问题 Short Intro Currently I have a UITableView which is filled with custom cells that displays uploading progress for files currently being uploaded to a server. The uploading processes are simply NSURLConnection objects running asynchronously in the background using the standard asynchronous method of the NSURLConnection. The problem is that during scrolling, the UITableView, or I suppose the UIScrollView of the UITableview, kind of blocks the entire main thread, which does that vital

UIScrollView ContentSize.height is 0.0000 by default?

拟墨画扇 提交于 2019-12-14 02:10:26
问题 I am trying to create a dynamic form using a UIScrollView, but I noticed when I used a NSLog that my scrollView's contentSize.height = 0.00000 I built the scrollView to the width and height of the screen on storyboard with elements inside it. So why does it return 0? All the elements inside the scrollView are showing/functioning correctly. Does scrollView's contentSize always default at 0 and I just need to set it? 回答1: Yes is 0 by default. You should set the content size of your scrollview

Subclass a zooming UIScrollView without delegate methods

谁都会走 提交于 2019-12-14 01:01:26
问题 I want to implement a UIScrollView subclass to present some custom formatted content. I just set a model object property of the scroll view and it handles all the required layout and rendering to display the content. This works fine, but now I'd like to include zooming. According to the documentation, to support zooming you have to set a delegate and implement the viewForZoomingInScrollView: method. I guess I could set the delegate to the scroll view itself and implement that method in the

UIScrollView -setContentInset not working

喜欢而已 提交于 2019-12-13 21:14:38
问题 I've got a fairly straightforward scroll view setup, and I want to get rid of the contentInset. MyViewController.h @interface MyViewController : UIViewController @property (weak, nonatomic) IBOutlet UIScrollView *scrollView; @end MyViewController.m @interface MyViewController -(void)viewDidLoad { [super viewDidLoad]; [self.scrollView setContentInset:UIEdgeInsetsZero]; ... } In my storyboard, my scrollview starts from the bottom of the navbar. Unfortunately, I get the below result when running

RE: autorotating, scrolling, bulleted, indented UIScrollView with attributed strings

你。 提交于 2019-12-13 18:24:06
问题 This was a doozy to produce, and since I had much help from SO contributors in putting it together, it seems fair to post the results (as an answer, below). If you’re looking for examples involving attributed strings in iOS and Core Text and scrolling, here they are assembled. A few extra points: Wrapping: This is done by the attributed string’s lineBreakMode, which defaults to wrapping. You won’t be able to retrieve the soft line breaks from the string (unlike in Cocoa, where NSTextView puts

UIWebView horizontal bounce not working

心已入冬 提交于 2019-12-13 16:35:52
问题 I am trying to get my UIWebView to bounce Horizontally, it already bounces vertically but its just not doing the Horizontal bounce. I add the UIWebView like this // pass data off to the correct view to be used lpViewController = [[LPViewController alloc] init]; lpViewController.view.frame = CGRectMake(0.0, infoBarHeight, lpViewController.view.bounds.size.width, lpViewController.view.bounds.size.height); lpViewController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth |

touchesMoved not firing in iOS5 for the iPhone for UIScrollView

爷,独闯天下 提交于 2019-12-13 15:54:41
问题 I have an iPhone app with a ScrollView which needs to respond to touch events. In order to support touch events in the scrollview I needed to base it off a custom class which captured the touch events and passed them to the main view. It works as expected when run in the 4.3 iPhone simulator. With the NSLOG entries I get output like this: 2011-10-17 09:28:06.782 SingleView[7000:b303] gameTable began 2011-10-17 09:28:06.784 SingleView[7000:b303] outside began 2011-10-17 09:28:09.976 SingleView

setScrollsToTop with multiple UIScrollView classes and/or subclasses(UITableView)

China☆狼群 提交于 2019-12-13 15:26:39
问题 I know that setScrollsToTop gets confused when you have more than one scrollable view, but is there any way to fix this? Can you specify which view to scroll to top, thus clarifying it for the property? Eg, I have myScrollView and myTableView in the view How can I set it so only myTableView scrolls to top when the status bar is tapped? Alternatively, is there a notification that goes off (or I can subscribe too) when the status bar is tapped? Thanks in advance, I hope this makes sense! 回答1:

How can I get scrollViewDidScrollToTop to work in a UITableView?

杀马特。学长 韩版系。学妹 提交于 2019-12-13 13:12:43
问题 I think the title explains it all. I want to be notified when a user scrolls to the top of a tableview. I've tried the following with no luck and even added a UIScrollViewDelegate to the .h file. - (void)scrollViewDidScrollToTop:(UIScrollView *)scrollView{ NSLog(@"ScrolledToTop"); } Thanks! Edit : I can get it to call if I press the status bar. But not if I scroll to the top. Weird... could it have something to do with the tableview bouncing when it reaches the top? 回答1: What happens if you

Make UICollectionView scroll right to left?

半城伤御伤魂 提交于 2019-12-13 11:51:20
问题 The natural direction for a UICollectionView to scroll when set horizontally is from left to right. Is there any way to reverse this? The simpler the better. 回答1: I'm not sure exactly what you mean -- if you set the scrolling to horizontal, it scrolls equally well, left and right. If you want it to start it from the right side, you can use this method: [self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:self.theData.count - 1 inSection:0] atScrollPosition