uiscrollview

Dismissing Modal View Controller causing layout problems

会有一股神秘感。 提交于 2019-12-11 01:54:51
问题 I have a UIScrollVIew in a Navigation controller, I present a Modal View controller from the Navigation controller, which works fine. When I dismiss the modal view controller (from the parent), all the content in my UIScroll view gets moved around and paging is broken. The contents of the scroll view are added programmatically, but the scrollView was created in IB. 回答1: Sounds like it has to do with autoresizing behavior as well as the autoresizing masks. In IB, turn off "Autoresize Subviews"

make transparent stickyHeader like weather iOS

非 Y 不嫁゛ 提交于 2019-12-11 01:37:56
问题 i want to create transparent sticky header like weather app in iOS as my header is transparent view goes under header but i don't want other content visible bellow my header. ( you can see "Friday" goes under header and will hidden but the header is transparent). you can check the animation and this behavior in weather app. i have tried : CSStickyHeader 回答1: This is done with a combination of various scroll views and table views. It looks like the whole screen is contained in a UIScrollView .

Adding custom UIViews to a UIScrollview - how to calculate position, size and handle zoom?

时光总嘲笑我的痴心妄想 提交于 2019-12-11 01:19:55
问题 As an iOS newbie I'm trying to develop a (yet another) word game. I have a UIScrollView holding an UIImageView with the board image. The UIScrollView can be zoomed by double tap and pinch gestures: Underneath the UIScrollView I have 7 draggable UIView s representing letter tiles. The implementation in Tile.m handles dragging with touchesBegan , touchesMoved and posts a notification in touchesEnded . The single view controller ViewController.m observes this notification and adds/removes the

UITableView On Screen Image Download Lazy Loading

♀尐吖头ヾ 提交于 2019-12-11 01:18:59
问题 First of all this is not a duplicate. I have seen some identical questions but they didn't help me as my problem varies a little bit. Using the following code i am download the images asynchronously in my project. { NSURL *imageURL = [NSURL URLWithString:imageURLString]; [self downloadThumbnails:imageURL]; } - (void) downloadThumbnails:(NSURL *)finalUrl { dispatch_group_async(((RSSChannel *)self.parentParserDelegate).imageDownloadGroup, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY

Zoom Core Graphics in UIScrollView

时间秒杀一切 提交于 2019-12-11 00:47:17
问题 I was wondering which would be the best way to scale my Core Graphics drawings as I zoomed in using a UIView subclass within a UIScrollView. Currently when I zoom in, the drawing becomes slightly fuzzy - I know this is correct functioning, I just want to know how developers override it to keep the image sharp... Thanks! (P.s. I have heard about using Core Animation, but I don't know where to start on that huge library with scary names haha!) 回答1: The simplest way is to use supersampling.

UIScrollView - setting proper contentOffset for new contentSize yields undesirable empty space

删除回忆录丶 提交于 2019-12-11 00:41:07
问题 I have been juggling for a while with UIScrollView now. What I am trying is to insert subviews into the scrollView based on various factors. Since I have scrollview to scroll only in vertical direction, I would insert the subview before or after the current visible view. So, lets say my current visible view's frames are (0,0,320,480), the contentSize of scrollView is (320,480) and current contentOffset is (0,0) When I want to insert subview above the currentView and yet keep the currentView

UITableView inside UIScrollView – Table Cell is not selectable

本秂侑毒 提交于 2019-12-10 23:55:33
问题 Like said in the title, I have a problem with an UITableView which is in my app a subview of an UIScrollView . In my UIScrollview I have several images, labels, etc. and at the bottom my UITableView is set. I can fill the table view with values etc., but when I try to select a cell by touch, nothing happens. To see the UITableView, you must scroll down a little bit in the UIScrollView. Maybe this is the issue? How do I solve this problem? Thanks! 回答1: When I have to do this kind of thing I

Why won't basic UIScrollView with a few buttons scroll?

﹥>﹥吖頭↗ 提交于 2019-12-10 23:41:04
问题 Why won't basic UIScrollView with a few buttons scroll? So all I have done is: Create a view based iPhone app drag in a UIScrollView into the main controller xib file the scrollview now sits as a child of View in IB in IB in scrollview increase it's view height up to 1000 add some buttons to the scroll view (so they appear as children of the scroll view) did create the instance variable also, and property IBOutlet, synthesize linked in IB the File Owner scrollView outlet to the scroll view

Event scrolling (scrollViewDidScroll) never called - Swift 3

杀马特。学长 韩版系。学妹 提交于 2019-12-10 23:37:28
问题 I would like to detect when the user scroll, I used a UIScrollView, I implemented the UIScrollViewDelegate in my ViewController and tried scrollViewDidScroll, scrollViewDidEndScrollingAnimation and all the others but these events are never called. import UIKit class ViewController: UIViewController, UIScrollViewDelegate { @IBOutlet weak var scrollView: UIScrollView! override func viewDidLoad() { super.viewDidLoad() let xOrigin = self.view.frame.width let view1 = View1(frame: CGRect(x: 0, y: 0

loadHTMLString won't fire while UIScrollView is scrolling

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 21:53:25
问题 I'm trying to lazy load UIWebViews inside a UIScrollView . Every time the user scrolls, the WebViews frames are updated and new content SHOULD be loaded. And that's exactly where I'm having trouble. The repositioning works well, but the new content (local NSStrings , which are called using loadHTMLString ) does not appear until I stop scrolling the ScrollView. I've read this thread already: NSURLRequest won't fire while UIScrollView is scrolling. Getting some inspiration from that, is there