uiscrollview

Zoom a rotated image inside scroll view to fit (fill) frame of overlay rect

丶灬走出姿态 提交于 2019-12-20 10:25:18
问题 Through this question and answer I've now got a working means of detecting when an arbitrarily rotated image isn't completely outside a cropping rect. The next step is to figure out how to correctly adjust it's containing scroll view zoom to ensure that there are no empty spaces inside the cropping rect. To clarify, I want to enlarge (zoom in) the image; the crop rect should remain un-transformed. The layout hierarchy looks like this: containing UIScrollView UIImageView (this gets arbitrarily

UIScrollView and Cocos2D

删除回忆录丶 提交于 2019-12-20 09:47:38
问题 I have created a UIScrollView in a cocos2d application. I am adding sprites dynamically, over 3 pages. On the first page, touch works perfectly on a sprite, however if I use the scroll view and navigate to the second page, touch does not work quite right... the sprite will respond to the touch when I touch the screen, approximately the amount I have scrolled to the left. If I scroll back to the first page, touch works perfectly for a sprite. Any ideas? I am using the following tutorial: http:

Making a slide up view similar to the new Google Maps iOS app, troubles with multiple UIPanGestureRecognizer

☆樱花仙子☆ 提交于 2019-12-20 09:45:20
问题 I am trying to reproduce the behaviour of the slide up menu of the new iOS Google Maps application. So basically it's a view that you can slide up with panning up to a certain point or slide down to a certain point. This view can also with sliding to the right and to the left like a paginated scroll view. It should either scroll up and down or slide to the side but not both at the same time. After a lot of research and testing I have something that's close but not quite working like need it

How to center a UICollectionView when it is tapped?

拟墨画扇 提交于 2019-12-20 09:38:02
问题 I have a UICollectionView and it has quite a lot of UICollectionViewCells on it. I want to scroll the cell to the centre of the UICollectionView when it is tapped. My concern is that even if I tap the last or the top cell it should move to the centre of the collection view. I have tried setting the contentInsets and offsets but they don't seem to work. I think I will have to change the content size on selection and change it back to original when the scrolling begins. 回答1: Setting

Autolayouts in UIScrollView using Cirrious.FluentLayouts.Touch

↘锁芯ラ 提交于 2019-12-20 07:26:56
问题 I've to do a ViewController with autolayouts in scrollView, but here is few problems: public SomeVC() : UIViewController { _mainScrollView = new UIScrollView { ShowsHorizontalScrollIndicator = false, ShowsVerticalScrollIndicator = true, BackgroundColor = UIColor.Clear, ScrollEnabled = true, AutoresizingMask = UIViewAutoresizing.FlexibleHeight, TranslatesAutoresizingMaskIntoConstraints = true }; _userDataTableView = new UITableView(CGRect.Empty, UITableViewStyle.Grouped); _userDataTableView

my initial problems with UIScrollView now appear to be related to autolayout

时光总嘲笑我的痴心妄想 提交于 2019-12-20 07:14:18
问题 For my first challenge using UIScrollView I modified this example to make UIScrollView display not just another background colour but another UIView and UILabel on each page. But I could have just as easily chosen to display objects like UITableView , UIButton or UIImage . Potentially, UIScrollView could be much more than a giant content view where users scroll from one part to the next, e.g., some pages might have a UIButton that takes a user to a specific page, the same way we use books.

scrollView doesn't work even though contentSize is larger than frame and subview is added before setting content size

China☆狼群 提交于 2019-12-20 05:58:42
问题 - (void)viewDidLoad { [super viewDidLoad]; self.navigationController.navigationBar.translucent = YES; [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"sprites_0001_Rectangle-1.png"] forBarMetrics:UIBarMetricsDefault]; self.navigationController.navigationBar.translucent = YES; UIImageView *imageView = [[UIImageView alloc]init]; UIImage *image = [UIImage imageNamed:@"sprites_0000s_0008_1st-Page.png"]; imageView.image = image; //imageView

scrollView doesn't work even though contentSize is larger than frame and subview is added before setting content size

半世苍凉 提交于 2019-12-20 05:57:17
问题 - (void)viewDidLoad { [super viewDidLoad]; self.navigationController.navigationBar.translucent = YES; [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"sprites_0001_Rectangle-1.png"] forBarMetrics:UIBarMetricsDefault]; self.navigationController.navigationBar.translucent = YES; UIImageView *imageView = [[UIImageView alloc]init]; UIImage *image = [UIImage imageNamed:@"sprites_0000s_0008_1st-Page.png"]; imageView.image = image; //imageView

iOS: Best way to make a UIScrollView with dynamic height?

回眸只為那壹抹淺笑 提交于 2019-12-20 04:36:06
问题 I'm currently setting up a UIScrollView with the following structure UIScrollView --ContentView (UIView) --ContainerView1 (UIView) --UILabel1 --UILabel2 --ContainerView2 (UIView) --UILabel3 --UILabel4 --ContainerView3 (UIView) --UILabel5 --UILabel6 I've pinned all the four edges for all the elements above and also have defined their height constraints (Storyboard complaints of zero height if I didn't do so). Now whenever my UILabel receives its text from the server, I call sizeToFit for all

uiscrollview won't cancel content touches for uisegmentedcontrol

空扰寡人 提交于 2019-12-20 03:55:17
问题 I've subclassed th UIScrollView and overriden the touchesShouldCancelInContentView: method the following way: -(BOOL)touchesShouldCancelInContentView:(UIView *)view { if ([view isKindOfClass:[UIButton class]] || [view isKindOfClass:[UISegmentedControl class]]) { return YES; } if ([view isKindOfClass:[UIControl class]]) { return NO; } return YES; } It works perfectly for UIButton, but it doesn't work for UISegmentedControl. Any help would be appreciated 回答1: Finally figured it out. Had to