uiscrollview

How to add an Image array in to UIScrollView?

◇◆丶佛笑我妖孽 提交于 2019-12-13 04:59:15
问题 i am newbie in iOS Development i make an Application that contain ScrollView and i add an array images inside scrollview but it is not working. I write a code for that for(int index=0; index < [self.imagesa count]; index++) { NSDictionary *dict=[self.imagesa objectAtIndex:index]; NSString *image=[dict valueForKey:@"link"]; UIImageView *bigImage=[[UIImageView alloc]init]; bigImage.bounds=CGRectMake(0, 0, self.zoomScroll.frame.size.width, self.zoomScroll.frame.size.height); bigImage.frame

Can I pass a pinch gesture recognizer to a ScrollView to have it zoom?

一世执手 提交于 2019-12-13 04:45:10
问题 I wrote a custom pinch gesture recognizer for my ScrollView's zooming, and I handle pinch touches in a method in my view controller. But in some cases, I want the ScrollView to behave exactly as it would normally behave (if it used the standard pinch gesture recognizer that comes with ScrollView). Is there some way that in such cases I can pass my custom gesture recognizer to the ScrollView and it would use that recognizer to scale the view as it normally would? Could I pass the gesture

Fade UIImageView as it approaches the edges of a UIScrollView

我们两清 提交于 2019-12-13 04:44:41
问题 I have a UIScrollView over an image at the bottom of my app that acts as a dock with icons that can be scrolled through horizontally. Instead of the harsh edges of the UIScrollView, I would like the icons to fade out for a more aesthetically pleasing look. Being new to iOS development, I don't know if either of these would be valid options: Create a faded image to use as an overlay on the scrollview so the icons only appear through the visible portion. Actually change the alpha of the images

Drawing in UIScrollView

自古美人都是妖i 提交于 2019-12-13 04:43:32
问题 I am currently working on a project that enables you to draw with touches in a scrollview. The only problem is, it doesn't let me draw to the bottom part of the scrollview. I am thinking it has something to do with UIGraphicsgetCurrentContext() . Any help will be awesome! Heres what I have so far - (void)drawRect:(CGRect)rect { //Here UIGraphicsBeginImageContextWithOptions(CGSizeMake(1630, 2400), YES, 5); __block CGContextRef context = UIGraphicsGetCurrentContext(); //CGContextAddRect(context

What is the correct way to implement a scrollview with a sticky (horizontal scrolling) header that also has a scroll-to-enlarge effect?

こ雲淡風輕ζ 提交于 2019-12-13 04:42:36
问题 This question is a spin-off of Sticky scrollview subview has incorrect frame after scrolling fast. Compilable example. If you would like to download the sample project, visit that link. The scenario: (though this will vary) ViewController . View . . MainScrollview . . . ImageScroller . . . . ImageView(s) . . . TextView (Inside container view) The main scrollview is the size of the screen. The top ~half of the screen is a horizontally scrolling scrollview of UIImageViews. The goal: Scrolling

iOS drag and drop to another view with subclass

一个人想着一个人 提交于 2019-12-13 04:36:13
问题 I have a RootViewController with a UIScrollView (boardScrollView). This has a UIImageView as subview to create a board (boardImage). I can zoom in and out, works fine. Also scrolling works fine! Now, I want to drag & drop other UIImageViews (Tiles) into and out of the ScrollView. I have subclassed UIImageView to TileImageView and overridden methods touchesBegan, touchesMoved and touchesEnded. The drag & drop works fine on the superview. But I want to be able to drop the Tiles on the

Image Slider with UIScrollView

痴心易碎 提交于 2019-12-13 03:46:30
问题 I am making an image slider that slides automatically every 2 seconds. The code I have wrote moves immediately to the next image without the slide animation, I want to fix it somehow by showing the scrollview scrolling, this is my code: var imagesArray = [UIImage]() static var i = 0 override func viewDidLoad() { super.viewDidLoad() imagesArray = [image1, image2, image3, image4] for i in 0..<imagesArray.count{ let imageview = UIImageView() imageview.image = imagesArray[i] imageview.contentMode

Enable UITableView scrolling during a scroll in UIScrollView

て烟熏妆下的殇ゞ 提交于 2019-12-13 03:46:22
问题 I have a UITableView inside a UIScrollView The table view looks like: private(set) lazy var tableView: UITableView = { let tableView = UITableView(frame: CGRect.zero, style: .plain) tableView.separatorStyle = .none tableView.showsVerticalScrollIndicator = false tableView.rowHeight = 70 tableView.backgroundColor = .blue tableView.bounces = false tableView.alwaysBounceVertical = false tableView.isScrollEnabled = false return tableView }() As you see I have disabled the scrolling in the table

iOS 6 table scrolling causing issues

懵懂的女人 提交于 2019-12-13 03:06:40
问题 There are two sections in my table view, one for test status and one for results. The third row in the first section gets changed upon the test completing. During the test it documents the percentage complete and after it changes to showing if any problems have been detected. The color of the text also changes to indicate bad/ok/good. For this particular test there are about 20 rows of results. The problem being that within those 20 results two cells are being treated like the third cell in

UITableView and Another View inside ScrollView

折月煮酒 提交于 2019-12-13 02:35:59
问题 I have UITableView and UIView (used to show image slideshow) inside UIScrollView . The tableview is dynamic and i want to automatically adjust height of table view to show all the cells(and disable scrolling of tableview) and scrollview should show both slideshow and tableview and could be scrollable, I know how to do this with code but i want to know if is possible to do in Interface builder(without using iOS6 auto layout) using previous(iOS5 and early) autoresize method in the xcode size