uiscrollview

scrollViewDidScroll not executing

天大地大妈咪最大 提交于 2019-12-12 22:17:35
问题 I think have decent experience working with iPhone development. as much I know.. I did set up the delegate.. I have from top to botton UIView --> UIScrollView--> UITextView I tried everything... to get the event scrollView to fire the scrollViewDidScroll event. is anything wrong with the structure.. there not much of the code to post here. what I am trying to do is.. do something when UITextView is scrolled. 回答1: Sorry did not respond... Just wanted to share in case anyone need this... I used

Margin between images in UIScrollView

早过忘川 提交于 2019-12-12 21:54:14
问题 The effect I'm after: Having spacing between images that is only visible while scrolling (like the photos app). A lot of old obj-c answers suggest extending the scroll view's bounds offscreen to make it page farther, and making this offscreen space the gap between images. The documentation for pagingEnabled states: If the value of this property is YES, the scroll view stops on multiples of the scroll view’s bounds when the user scrolls. So in trying to change the multiples value, I extended

Custom UITableViewCell: programmatically trigger selection segue

和自甴很熟 提交于 2019-12-12 20:54:43
问题 I have a custom UITableViewCell containing a UIScrollView. Unfortunately, the scroll view intercepts taps, so I added my own tap gesture recognizer. Now when a user taps on my custom cell I'd like to trigger the selection segue that I configured in Interface Builder, but I can't figure out how to access the target and action from my custom UITableViewCell subclass that I set in IB. How would I do that? PS: I'm aware that I could use a custom scrollview as suggested here: https://stackoverflow

Adding UILabels and UIImageViews to UIScrollView programmatically

北战南征 提交于 2019-12-12 19:50:52
问题 I know this question is on here a lot, but I still can't seem to get this to work. I'm probably not initiating the view correctly or something... Anyway, I'm trying to add several labels and images to a UIScrollView programmatically. Here is my code for my .h file: #import <UIKit/UIKit.h> @interface DOR_HelpViewController : UIViewController <UIScrollViewDelegate> { IBOutlet UIScrollView *scrollView; } @property (nonatomic, retain) IBOutlet UIScrollView *scrollView; @end And my .m file:

UIScrollView can't zoom in iOS7 with Auto Layout

荒凉一梦 提交于 2019-12-12 19:18:31
问题 i have created an UIScrollView with this hierarchy (my sample is AutoLayout) UIViewController UIView UIScollView ContainerView UIImageView everything work fine in iOS 8 - 9 expect iOS 7 i can zoom my ImageView in iOS 7 i have implemented : -(void)viewDidLayoutSubviews { [super viewDidLayoutSubviews]; CGSize scrollableSize = CGSizeMake(self.imageView.frame.size.width,self.imageView.frame.size.height); [self.scrollView setContentSize:scrollableSize]; self.scrollView.backgroundColor = [UIColor

Autoresize UIScrollView

梦想的初衷 提交于 2019-12-12 19:18:12
问题 I made a UIViewController, which programatically generates a UIScrollView. Everything's fine, but when I rotate the Device, the UIScollView should resize so it takes the complete width of my View. Is there a way to do that without rebuilding the complete UIScrollView ? Thx a lot ! Sebastian This is called in my viewDidLoad: -(void)buildmyScroller { myScroller = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 800, 768, 100)]; //...adding some subviews to myScroller thumbScroller.contentSize

conflict scrolling scrollview and tableview

好久不见. 提交于 2019-12-12 18:33:46
问题 I have a scrollview that contain some element (uiimage, webview ,...) in buttom of scrollview add tableview (comments list). Problem: although tableview is part of scrollview, but scrollview scroll separate and tableview scrolling separate! I want at the end of scrollview and start tableview scrollview scrolling tableview and tableview scroll disabled. I used it code: Swift: override func intrinsicContentSize() -> CGSize { self.layoutIfNeeded() return CGSizeMake(UIViewNoIntrinsicMetric,

UIButton inside UIScrollView disables scrolling

妖精的绣舞 提交于 2019-12-12 18:26:07
问题 After dragging a button to my scrollview, the window no longer scrolls! If I remove the button, scrolling now works. Anyone run into this issue before? //ScrollViewController.h @property (weak, nonatomic) IBOutlet UIScrollView *scroller; //ScrollViewController.m - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. [self.scroller setScrollEnabled:YES]; [self.scroller setContentSize:CGSizeMake(320, 700)]; } 回答1: Actually, it just worked after adding

Simulating drags inside a scrollview

久未见 提交于 2019-12-12 17:29:09
问题 :) I am working on intercepting, and resending gestures sent to a scrollview. What I want to do: Kill all gestureRecognizers in the scrollview. I have accomplished this. Add new gestureRecognizers in the scrollview. I have accomplished this as well. Make the new recognizers behave the same as the old ones. I have NOT accomplished this, and I need help doing so. The only new recognizer I have added is a pan gesture recognizer, which requires at least two fingers. I want this to behave exactly

Bad performance on scroll view loaded with 3 view controllers, drawn with CALayer

安稳与你 提交于 2019-12-12 17:25:53
问题 i have a scroll view loaded with 3 view controllers. each view controller is drawing its layers with that code - (there us more then that but I pulled it out to check if it will help). still i have very crappy sliding. any help ? shani CALayer *sublayer = [CALayer layer]; sublayer.backgroundColor = [Helper cardBackGroundColor:card].CGColor; sublayer.shadowOffset = CGSizeMake(0, 3); sublayer.shadowRadius = 5.0; sublayer.shadowColor = [UIColor blackColor].CGColor; sublayer.shadowOpacity = 0.8;