uiscrollview

UITableView in UIView in UIScrollview : On tap in UITableView data gets cleared

一曲冷凌霜 提交于 2019-12-13 02:24:47
问题 For work purposes I need to create a UIScrollView which embeds a UIView which in his turn embeds an UITableView via the container feature in Xcode. My UIScrollView is a full page scrollview with Paging enabled. My UIView is filled with a UIImage, some UIButton's and a container linking to a UITableView. On initial launch, the data is loaded perfectly, meaning the UITableView is filled with the data, the UIImage is filled, and the Buttons are placed correctly. But for some strange reason the

How to make a UIImageView centered in a Scrollview when zoom out?

末鹿安然 提交于 2019-12-13 02:24:30
问题 Just trying to figure out a way to make a ordinary photo viewer for iPhone and I just couldn't make the zooming work. myimageview = UIImageView() myimageview.translatesAutoresizingMaskIntoConstraints = false myimageview.image = UIImage(named: "1") scrollview = UIScrollView() scrollview.delegate = self scrollview.backgroundColor = UIColor.brownColor() scrollview.minimumZoomScale = self.view.frame.width/myimageview.image!.size.width scrollview.maximumZoomScale = 1.0 scrollview

How to scale a UIImage view to a square with Autolayout inside a UIScrollView

泪湿孤枕 提交于 2019-12-13 02:18:11
问题 I've been struggling to learn autolayout (finally). I want to have a vertically scrolling UIScrollView that holds all the content for the view. I want to pin a UIImage view to the top of the scrollview and keep the image a square (scaleToFill). Basically I want to do this (only I want to do it with autolayout): I can't get the image to keep its aspect ratio while staying within the screen bounds. Whenever I add an aspect ratio constraint the imageView grows to like 600 points (the width of

Xamarin UIScrollView GestureRecognizerShouldBegin reports velocity of 0 when scroll view is moving

隐身守侯 提交于 2019-12-13 02:14:53
问题 I'm using Xamarin to develop an iOS app and I want to subclass UIScrollView in order to handle the pan gesture in the scroll view based on its velocity. So, I made an override of GestureRecognizerShouldBegin and I check the VelocityInView of the pan gesture. This works fine for the first gesture, but subsequent pan gestures that fire while the scroll view is in motion (decelerating) always report a velocity of (0, 0): public class MyScroll : UIScrollView { public override bool

UIScrollView and auto layout not working

大兔子大兔子 提交于 2019-12-13 02:14:43
问题 I'm trying to make a view scrollable in my app. O follow exactly the steps in tutorial https://www.youtube.com/watch?v=UnQsFlMGDsI . The main steps I did were: Add a UIscrollView Add a view into UIscrollView (Content View) Create the margin constraints with value 0 (top, left, right and botton) for UIScrollView Create the margin constraints with value 0 (top, left, right and botton) for Content view Create 2 constraints of "equal width" and "equal height" between ContentView and main view ...

scrollview size with Autolayout: frame is 600x480 in compact/Any size class, bigger than iphone5?

不羁的心 提交于 2019-12-13 01:33:55
问题 I would like my scrollview's frame to be the same size as the superview's frame. And set the contentsize so that it contains all the imageViews. The problem is with AutoLayout, the width and height is 600 x 480, I use an iphone5 and the size class is w:Compact / h:Any.(I expected something like : 320 x 523 ). My constraints are : Equal Width with superview, Equal Height with superview (multiplier 0.8), horizontal center X, and vertical center Y. let pagesScrollViewSize = scrollView.frame.size

iOS dynamically load new cell to the bottom of a tableview

时光怂恿深爱的人放手 提交于 2019-12-13 00:33:47
问题 I'm working on an iOS project where I want to dynamically add more cell to the bottom of the tableview once the user reaches the bottom. I currently have this working by calling a method that fetches more data that is added to the array that I'm using to hold my cells. When I'm done adding the objects to the array I call [tableView reloadData]. This works, but it doesn't visually load the cell until the tableview stops scrolling. I also tried using [tableView insertRowsAtIndexPaths: inSection

cannot make a text view scroll - xcode 4.3

江枫思渺然 提交于 2019-12-13 00:28:50
问题 I am using Xcode 4.3 I have a single screen that has a text view UITextView that I wish to be able to scroll just vertically. I have added a scroll to the screen UIScrollview and a UITextview on top of that. I have created a new outlet called theScroller and in the viewcontroller.m file added the line. (void)viewdidLoad { self.thescroller.contentSize=CGSizeMake(280.0,600.0); However in most tutorials I have watched, they all add a line before this to set scroller to YES, but in Xcode 4.3 it

Conflictive scroll on UITableView within UIScrollView

跟風遠走 提交于 2019-12-13 00:14:52
问题 I had three UITableView s contained in one UIScrollView ( pagingEnable = YES ), The hierarchy looks like: +--visible area--+ ---+ +---------`UIScrollView`---------+---------------+| --+| | +-------------+ +-------------+|+-------------+|| -+|| | | 0 | | 1 ||| 2 ||| ||| | |`UITableView`| |`UITableView`|||`UITableView`||| equal height | | | | ||| ||| ||| | +-------------+ +-------------+|+-------------+|| -+|| +--------------------------------+---------------+| --+| +----------------+ ---+ The

iPhone sdk Cocoa Touch - Pass touches down from parent UIView to child UIScrollview

旧城冷巷雨未停 提交于 2019-12-12 23:07:45
问题 I have a UIView inside my xib in IB and inside that is a UIScrollview that is a small 80x80 square and dynamically loaded with 8 or so 80 x 80 thumbnail images. The UIScrollview is not clipping the images so that they extend out either side so you can swipe left and right to scroll a chosen image into the the centre, paging is on so they snap ti each image. I have researched and found this is the best and possibly only way to do this. The UIScrollview sits in a 'container' UIView for one