uiscrollview

Multiline UILabel with UIScrollview using autolayout

天涯浪子 提交于 2019-12-12 04:55:01
问题 I read many post of contentview in scrollview ,but the problem is slightly different.check out the image and i have following hierarchy Here the label is multiline label and its fill up with too many content size. so, the problem is 1. according to the lines of the label , height of label changes and 2. accoring to height of label , contentview height changes. so, that it scrolls. and i want this things to be done with autolayout . And one thing i want to mention is , i'm using ios 8.1 and

setting Alpha for UIView that is a subview of UIScrollVIew very slow

杀马特。学长 韩版系。学妹 提交于 2019-12-12 04:53:38
问题 I have UIScrollView that contains several UIView when I try to setAlpha: for one of the UIView , I get 1.5 second delay till the UIView alpha is set. Here is the code below setContentOffset does run before the setAlpha: although the setAlpha: is written before in code -(void)setAlphaForIndex:(int)Index{ for (UIView *v in imgScroll.subviews){ if (v.tag == Index) { [v setAlpha:0.6]; if (![self checkIfImageInScrollRange:Index]){ if (v.tag < 5) [imgScroll setContentOffset:CGPointMake(0, 0)

UIScrollView's contentOffset being reset when clicking anywhere

落花浮王杯 提交于 2019-12-12 04:53:36
问题 I have an introduction sliding view pager type in my iOS app, and the last page has two text inputs. There are 7 pages being displayed in a scrollview that swipes left to right, so on the last page when the keyboard appears, I am having the contentOffset changed to push up the layout so the text inputs are still visible above the keyboard. Now anytime the user selects the next input, or even clicks really ANYWHERE on the page, the contentOffset is reset and the inputs are put back under the

How can i display more than one file with different file extension in UIWebView/UIScrollView?

梦想的初衷 提交于 2019-12-12 04:53:04
问题 I did google too much to find it but not find what i exactly want. I have file.png, file1.jpg, file2.pdf, file.txt and file.doc and i want to preview this all file in one UIWebView or UIScrollView . Please help me how can i do it? Thanks in advance. 回答1: For Example image showing through HTML sting , This image in bundle file . The HTML sting load in webview follow this ! as like you need creating html sting with all files and display NSString *imageFileName = @"images"; NSString

Objective C: UIScrollView (pagingEnabled): When Next Page Enters Start The Animation

橙三吉。 提交于 2019-12-12 04:49:49
问题 I'm sorry for the title i don't know what to write there. I have a scrollView with many pages and in each page there are different animations that should start when the user switch to that page. i tried this: if (CGPointEqualToPoint (CGPointZero, CGPointZero)) { //start animation } it worked only for the first page when i changed it to CGPointEqualToPoint (CGPointMake (768, 0), CGPointZero) for the next page, it's not working. i am trying to use this ` - (void)scrollViewWillEndDragging:

How do you make a UITableView smaller programmatically?

倖福魔咒の 提交于 2019-12-12 04:43:19
问题 Rather than bloat and convolute this post with what I've tried and failed at, I'll just keep it simple, as I'm sure the answer is probably simpler than I think. I have a scrolling UITableView on the main view of my application. All I'm trying to do is move the default position--or "starting point"--of the scrolling UITableView down about 194 points to make room for my navigation bar and a couple other UI elements. How do I do this? Here are what I believe to be the pertinent method

Parallax UIScrollView – handling two views in one scrollViewDidScroll method?

醉酒当歌 提交于 2019-12-12 04:42:48
问题 I’m creating a basic parallax effect much like the iOS7 app switcher, using two UIScrollView instances ( cardScrollView and tileScrollView ). I scroll one alongside the other, at a different rate, like so: if ([scrollView isEqual:self.tileScrollView]) { [self.cardScrollView setContentOffset:CGPointMake((self.tileScrollView.contentOffset.x + 110) * TILE_CARD_DELTA, self.cardScrollView.contentOffset.y)]; } This works fine when scrolling tileScrollView . However, I’d like the same to work in

iOS Expanded/Selected Custom UITableViewCells state changes when scrolling UITableView

半城伤御伤魂 提交于 2019-12-12 04:39:54
问题 I have a list of custom cells in my tableview and as I scroll everything appears to fine and the cells appear to be in the same order. I have some functionality with my cells - as i select a cell (and it dynamically expands)the background color changes and a few other custom cell properties. Once I do this and then I start scrolling, different cells that i haven't even touched before show up, selected(expanded) and the cell only updates when I select it manually to the correct data. I seem to

Work out what image the scroll view is currently on

旧城冷巷雨未停 提交于 2019-12-12 04:35:51
问题 Trying to workout that what image scrollview is currently on to save it to photo library. It is not working still. UIScrollView *imageScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)]; imageScrollView.pagingEnabled = YES; NSInteger numberOfViews = 61; for (int i = 0; i < numberOfViews; i++) { CGFloat xOrigin = i * self.view.frame.size.width; NSString *imageName = [NSString stringWithFormat:@"image%d.png", i]; _image =

UIScrollView stops scrolling on keyboard dismiss

杀马特。学长 韩版系。学妹 提交于 2019-12-12 04:23:19
问题 I'm currently working on an app for iPhone using Swift 3 however I have ran into an issue with the scrollview. Prior to selecting a text field and having the keyboard appear, the scrollview work normally (ie.: I can scroll up and down), however after dismissing the keyboard, the scrollview does not allow me to scroll anymore which is my problem. Note: if I select a text field again and make the keyboard appear it works fine and stops working once it is dismissed again. I have checked the