uiscrollview

scrollView not scrolling swift

∥☆過路亽.° 提交于 2019-12-12 05:52:05
问题 I have a scroll view which is not scrolling. Googling seems to indicate that it may be to do with my constraints? My constraints are as follows: Trailing space to superview = -16 Leading space to superview = -16 Top space to top layout guide = 0 Bottom space to bottom layout guide = -13 I am printing out the scrollview contentSize in the viewDidLayoutSubViews and it is printing out the same value each time i.e: scrollview is (375.0, 356.5) Any idea what the issue may be 回答1: Check the bottom

iphone: UIScrollView Paging enabled with NO ZOOM and NO PREVIEW

限于喜欢 提交于 2019-12-12 05:36:34
问题 i want to implement a UIScrollView where paging is enabled and i can just flick through some images. Thats all i want to be able to do for now. I have done this so far in interface builder: can someone help? I dont know how to do the rest. Can someone please help me with this. I dont need any zooming functionality. I dont want any preview of the previous or next image within the scrollview, i just want a simple paging enabled scroll view that allows a user to flick through images. All help is

Move View when keyboard appears and present it in a scrollView. Swift 3

别来无恙 提交于 2019-12-12 05:36:29
问题 There are several similar questions on SO but non addresses the issue below. I'm working on a simple login view with just 2 textFields for email and password. The best UX is when a user taps one of the textFields, the keyboard pops in, and the view moves up, while becoming a scrollView. This way, a user can still see what other UI elements are on the screen. User should also be able to hide the keyboard by swiping down. (Instagram and other big boys have this implemented) I was able to built

UICollectionView Bounds Width is always 600

依然范特西╮ 提交于 2019-12-12 05:28:09
问题 I have a custom UIView say CustomView which has a UICollectionView as its SubView. I have added this customView inside a UITableView Prototype Cell and pined all four (top, bottom, left, right) edges to the standard distance with TableViewCell . contentView . Now i want to set the UICollectionView section insect. In this method - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section when

how to dynamically increase the height of scroll view?

感情迁移 提交于 2019-12-12 05:27:57
问题 i placed a table view and a view in a scroll view how to change the scroll view's height dynamically depending on the number of cells in the table view and the content present in content view also 回答1: You need to set contensize of your ScrollView. You can do it by proper autolayout or programatically as CGRect contentRect = CGRectZero; for (UIView *view in self.scrollView.subviews) { contentRect = CGRectUnion(contentRect, view.frame); } self.scrollView.contentSize = contentRect.size; In

predict table view scroll destination indexpath

一曲冷凌霜 提交于 2019-12-12 05:27:50
问题 I see UIScrollView has a method to predict final content offset scrollViewWillEndDragging:withVelocity:targetContentOffset: and since UITableView is also a UIScrollView, So I want to use this value to calculate the destination Cell while the view is still scrolling/decelerating I'm trying to loop through all the data and sum up the section headers, cell heights, section footers until the sum exceeds target Content offset. Would it work or is there a better way to do so? Thanks in advance, any

iOS : UIScrollView paging not working properly

蹲街弑〆低调 提交于 2019-12-12 05:27:29
问题 I'm adding AsyncImageView into UIScrollView to load images from web, its working fine, there are 8 images i've added. Problem is of paging I've enabled pagingEnable to YES but it won't come as per I want, I'm trying to setting it contentOffset with different x but it won't any effects. I want that each image should come in center of UIScrollView when I scroll or choose next or previous option. This is the code where I'm adding images to UIScrollView arrImgUrls is an NSArray _currentImage,

ios scrollview cunundrum

前提是你 提交于 2019-12-12 04:58:53
问题 I have a scroll view which is populating with views successfully however it isnt scrolling, can anyone see why? CGRect fullScreenRect=[[UIScreen mainScreen] applicationFrame]; UIScrollView *scrollView=[[UIScrollView alloc] initWithFrame:fullScreenRect]; [scrollView setContentSize:self.view.frame.size]; if (sqlite3_open(dbpath, &xxx) == SQLITE_OK) { // code that works if (sqlite3_prepare_v2(xxx, query_stmt, -1, &statement, NULL) == SQLITE_OK) { while (sqlite3_step(statement) == SQLITE_ROW) { /

Implementing UIWebView inside UIScrollView

◇◆丶佛笑我妖孽 提交于 2019-12-12 04:56:43
问题 I'm trying to use UIWebView inside UIScrollView, I want to display an webview under an image and make them scrollable. So I flowed those step : Desactivate the Scroll Property for UIWebView Set the UIScrollView and UIWebView height equals to content size. And this my code : - (void)viewDidLoad { [super viewDidLoad]; self.contentReader.scrollView.scrollEnabled = NO; NSString *myDescriptionHTML = [NSString stringWithFormat:@"<html> \n" "<head> \n" "<style type=\"text/css\"> \n" "body {font

How to show custom nested lists in iOS

旧巷老猫 提交于 2019-12-12 04:55:35
问题 I want to show a list in iOS that itself will contain a list. For example I want to create a day wise task list in which the day and task are dynamic.So outer list is DAY LIST and inner list would be TASK LIST.Also want to handle the click on TASKS. How can I achieve this in iOS, have tried using Table Views but cannot achieve it since I want to show nested list.In short I want to show a list of list in iOS. 回答1: // // ViewController.swift // Ishika // // Created by IShika on 12/06/17. //