UIScrollview : scroll with 2 fingers and not one - iphone

I have a UIScrollView containing another wiew. This view need to handle single touch event for drawing. For this reason I would like to scroll using 2 fingers.
I managed to get this working for 2.x SDK but it's no more working with 3.X series.
Do you have idea/workaround for achieving this?
Thanks in advance for your help :)

FWIW, I've tried exactly this as well on 3.x (never on 2.x) and never made it work correctly. It's possible that some combination of subclassing methods both approved (touchesShouldBegin...) and sketchy (touchesBegan..., hitTest...) could achieve this, but I've tried a lot of it, and could never get the event forwarding to work in a way that was consistent, and ended up with a parasitically fragile relationship to the scroll view.
I had to reimplement a scroll view from scratch to achieve this.

Related

UITableView using UIRefreshControl either Won't Finish or has Flicker/Jump under iOS11

I have searched multiple discussions/examples for hours re UITableView using UIRefreshControl, and found most predate iOS11, and fall into one of two basic implementations, neither of which are working for me. Either I pull down and it won't finish (i.e., control slides with spinning wheel, and swiping up merely bounces it back down - yes, I'm using .endRefreshing); or it successfully completes but not before flashing large title on top of control (with original title still pulled down), and table cells jump up and down.
I am using Storyboard, and checking the enable box. I am placing the code in ViewDidLoad, and have tried declaring a custom var outside and inside ViewDidLoad (as well as not using one, but that seems incorrect). In ViewDidLoad, I have tried using tableView's .refreshControl, as well as .addSubview. In the selector func, I have tried placing .reloadData above and below .endRefreshing. Every variation produces one of the above two incorrect behaviors.
I am new to all of this, and completely frustrated, as all I'm trying to do is learn how to implement the feature on an iPhone. I saw a post stating UIRefreshControl does not work as of earlier this month, but I find it hard to believe that Apple would just leave this rudimentary and ubiquitous feature broken for weeks+. Can anyone please help? Thanks, and happy holidays!

UIScrollView as a means of navigation using a container UIViewController in iOS5

I've accomplished a similar setup to this stackoverflow challenge.
Except it seems to break the UIViewControllers, because they don't receive certain messages properly (eg. viewDidAppear)
Further research reveals that the solution rests in iOS5 by using some container UIViewControllers.
Has anyone accomplished this successfully with UIScrollView?
I watched the WWDC2011 video on it and it's still confusing me on how I exactly replace my UIScrollView:subviews with full UIViewControllers. :/
With enough persistence (aka. Googling), and some luck with timing, I solved this challenge by using Tom Fewster's code ("Using UIPageControl as a container UIViewController").
Thank you Tom. :)
I implemented something along these lines a little while ago.
https://github.com/heardrwt/LayoutScrollView
It supports x number of views, as well as overlay views that allow for the tracking, addition and removal of on screen content.
it supports iOS4+ and uses iOS 5 containment when available.

Creating a tableview in the form of a 'film strip'

I am developing an RSS-reader-type application. I am toying with the possibility of using a normal TableView application but showing the articles as a film-strip. I am mainly thinking for an iPad application (but possible it works on the smaller iPhone as well).
The idea is to have the cells passing/scrolling across the screen using swipe touches (but horizontal, and not vertical as with the normal TableView). They will be some-kind of miniatures of the full article, and when tapped (or with multi-touch zoom to have better control) can be enlarged to read. Then can then just be be moved on as soon as the user has seen enough of it.
Does anybody know if there is an easy way of accomplishing something like that?
The most obvious solution that springs to mind would be to use a UIScrollView, as this will provide the inertial effects, etc. for free - all you'd have to do it populate it with the relevant sub-views. (UITableView's actually use a UIScrollView.)
For more information and sample code, see Apple's UIScrollView docs.
If you want horizontal scrolling, take a look at Jeremy Tregunna’s JScrollingRow. It’s open source under a public domain licence.

subviews and performance issues in iOS

I have different view controllers and i linked them using insertsubview
There are atleast three levels of subviews for every screen the users sees.
I havent tested it on device yet.
I want to know whether this causes any performance issues
Also, is using NavigationBarController pop and push views better than addsubview and remove from super view.
(I dont want the back functionality of NavigationBarController and want a custom header. That is why i didnt use NavigationBarController)
This is an interesting statement :
I haven't tested it on device yet.
My advice is simple :
Test it on a device.
Only you know what your app does - you can't possibly think we can answer your question with so little information! 3 doesn't seem a very big number but I don't know what each of those views is doing so maybe it's an issue, maybe not.

How to make UITableView work within TTScrollView?

I'm solving a problem how to make tableviews work within three20's TTScrollView. I have a project which I want to rebuild using three20 library. There is one module which allows user to flip through set of "pages", which contains table showing some list of data.
My problem is that when I rebuilt this module to use three20's TTScrollView, tableviews inside the scrollview do not work anymore. In particular, it cannot be scrolled and cannot select an item, because all touches are intercepted by the scrollview. I'm getting mad about this and cannot figure out how to make it work.
I'm able to make work either tableview or scrollview but not both (means tableview intercepts vertical dragging, while scrollview horizontal). It worked fine with UIKit's UIScrollview, so there must be a way how to do this, but simply cannot figure out how.
Please help, I'm struggling with it yet couple of days now, but cannot get over.
thanks much for any hint.
Matthes,
Unfortunately not many people here at SO help out much with three20 questions for whatever reason. You may have better luck asking the three20 google group (search for that on google).
First guess though without trying it myself: try using three20's built in table items such as TTTableTextItem or TTTableImageItem ...in certain scenarios with three20, he has built in code to ignore everything you write except for his own built in controls (which might be the case here, not sure).
You can see examples of how he creates tables with this code in the TTCatalog example app that you can find via www.three20.info