uiscrollview

Swift - Why ScrollView not full screen?

若如初见. 提交于 2019-12-12 03:39:07
问题 I had inserted a ScrollView into UIViewController and dragged ScrollView to fill the space between the navigation bar and the RAM label below: But when I run the app, the ScrollView does not fill the space: Please help me! Thank you very much. P/S: Sorry for my english is bad. 回答1: The scroll view is not covering up the whole thing because you are running the app on a much bigger phone. The simplest solution is to run the app on iPhone 5. However , if you want to solve the problem on all

ScrollView blocking NavigationViewController

时光总嘲笑我的痴心妄想 提交于 2019-12-12 03:27:51
问题 I have a UIView with a UINavigation controller and several other Imageviews and a text filed inside it. On the Navigation bar there is a UIBarbutton item which pushes another ViewController. When the text field in the Navigation Viewcontroller is tapped it brings up the keyboard causing the textfield to be blocked by the keyboard.I want to enable scroll view whenever the keyboard blocks the textfield. A notification is sent to this method whenever the keyboard is invoked. - (void

How to determine number of touches that are scrolling UITableView

纵然是瞬间 提交于 2019-12-12 03:23:34
问题 I am trying to determine number of finger touches on UITableView when - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView is called & perform some task accordingly. Two approaches that I have tried so far are: Subclassing UITableView to override touchesBegan:withEvent: - The problem with this approach is that this method is only fired when there is 'some' tap on the screen, not when the user just quickly scrolls without resting the finger. Using uipangesturerecognizer to detect number

UIScrollView - selection like UIPickerView

假如想象 提交于 2019-12-12 03:17:09
问题 I have two little problems with my UIScrollView. I managed to create scroll view, which is similar to the picker view except that it's horizontal. The problem n.1 is - How do I get the number which the user tapped? The problem n.2 is - How do I make the scrollview to go round and round - never-ending? A question - Is it possible to make some "selection indicator"? Here is my code: numberArray = [NSArray arrayWithObjects:@"1", @"2", @"3", @"4", @"5", @"6", @"7", @"8", @"9", @"10", @"11", @"12"

Loading a UIScrollView like a UiTableView

老子叫甜甜 提交于 2019-12-12 03:15:54
问题 Is there a way to load a UIScrollView in a similar way to how a UITableView is loaded - in other words, only load the visible 'cells'? For my example I have a large scroll view which can be scrolled in any direction. Inside that are 'cells' which I add to the scroll view using code. The cells consist of data gathered from json feeds (one feed per cell). I would like to only load the feeds for the visible cells, and then cache the ones already loaded, so they don't need to be reloaded. Is

UIScrollView with left and right arrows in IOS

妖精的绣舞 提交于 2019-12-12 03:14:29
问题 I have a UIScrollView with set of images with left and right button. I have implement the left button action for moving the image left side using this code if ( scroll.contentOffset.x <= scroll.frame.size.width ) { CGRect frame; frame.origin.x = scroll.contentOffset.x + scroll.frame.size.width; frame.origin.y = 0; frame.size = scroll.frame.size; //NSLog(@"%f %f %f", frame.origin.y ,scroll.frame.size.width, frame.origin.x); [scroll scrollRectToVisible:frame animated:YES]; } its working

Navigating back to UIViewController from TableViewController using NSNotifications

一曲冷凌霜 提交于 2019-12-12 03:08:57
问题 I have an exception like this: Thread 1: EXC_Breakpoint (code = EXC_I386_BPT,subcode=0x0) In my story board i have 3 controllers. Navigation controller, UIViewController and then a tableviewcontroller. When the app first launches UIViewController is shown. I add some stuff to the Core Data DB. Then on this controller itself i have a "Check Records" bar button. I click that and move to the 3rd controller the tableviewcontroller. Here i can see the records that i added on that day. I click the

populating images in UIScrollView. And how to do it lazily [closed]

自古美人都是妖i 提交于 2019-12-12 02:57:09
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . Well this is my usual domain now, I have managed some functionality, but I need to make it better. I am trying to populate recent images from camera roll. I'm pretty sure there is more elegant way to do it.

Issues with UIScrollView in UITableView cell

守給你的承諾、 提交于 2019-12-12 02:56:51
问题 I have been trying to add a scroll view to my table view's cell, but have been running into issues with the images being missing. The pages in the scroll view seem to be loading correctly (based on the debug view hierarchy), but none of the images are showing. Here is my code: class AppImagesTableViewCell: UITableViewCell, UIScrollViewDelegate { @IBOutlet weak var scrollView: UIScrollView! @IBOutlet weak var pageControl: UIPageControl! @IBOutlet weak var label: UILabel! var pageViews:

Objective C: UILongPressGestureRecognizer Error

久未见 提交于 2019-12-12 02:48:18
问题 I am trying too put a UILongPressGestureRecognizer on my scrollView but it is not working. It has an error after long touch saying: "Thread 1: Program Received Signal SIGABRT" here my code: - (void)viewDidLoad { [super viewDidLoad]; longPressToDrag = [[UILongPressGestureRecognizer alloc] initWithTarget:scrollView action:@selector(forLongPress:)]; longPressToDrag.minimumPressDuration = 3.0; [scrollView addGestureRecognizer:longPressToDrag]; [self pages]; } - (void)forLongPress: