How to make UITableView work within TTScrollView? - iphone

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

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!

How can I make a grid similar to iphone/ipads launcher screen?

I have seen a few grids made with UITableView but I don't really like how close together each cell is to the other. If there is a way of creating a grid system like the home screen on an iphone (the screen after it is unlocked) if would be great. I don't need an exact solution but a point in the right direction, maybe a set of libraries to look through would be great. I am running xcode 4.4.1
Thanks!
The key is UIScrollView has a paging mode (since could have more buttons than fit in the view). It's covered here's in Apple ocs:
http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/UIScrollView_pg/ScrollViewPagingMode/ScrollViewPagingMode.html
If you use that, each 'page' would have n buttons/views that when clicked would call a protocol/delegate call back for the consumer with the data to handle and it would evenly layout the UIView/buttons across that page view. Contact me if you want my sample.
You probably don't want to require iOS6 as a minimum requirement but if you do, you can do as H2CO3 suggested in the comment and us UICollectionview. Here's a tutorial: http://www.raywenderlich.com/22324/beginning-uicollectionview-in-ios-6-part-12
There's also some open source launchers that you can look into their code. Here's some (I'm sure there's more).
http://www.cocoacontrols.com/platforms/ios/controls/sespringboard
Code is at: https://github.com/sarperdag/SESpringBoard
Also: http://www.cocoacontrols.com/platforms/ios/controls/openspringboard
Use UICollectionView. You can create grid type views using that. It is available in iOS 6.
If you can target iOS 6+, use UICollectionView. It's one of the best new things in iOS for years and it will be as important as UITableView.
The layout you're asking for is only a few lines of code.
NSHipster has a good explanation of UICollectionViews and Ray Wenderlich has a good tutorial.
(There's lots of example code out there, but here's a very simple example project I did recently for another question involving UICollectionViews)

Problems with presenting views in Xcode

I hope you can help me with my actual problems with designing an iPhone-App in the latest xCode version.
Here´s what I find a bit strange:
I designed a new project with a Storyboard and a Navigation Controller. Then I placed Objects like UILabels, ImageViews and so on. No when I run the Project in the simulator (as well on the iPhone) I noticed the following: When the App loads all the in the View placed objects fall down from the top to take their defined place. It takes maybe the quarter of a second, but its clearly to see. It also happens on all other views initiated from the root view controller
So, what do I have to change that everything is at it´s fixed place without to fall down from the top at the start of the app?
I hope I described it good enough. Actually I have no idea what´s going on there. I hope you can help me to fix this "problem". I´ve written some small Apps before, but I´ve never noticed a behavior like this.
Got the solution: I´ve had to remove the animations on the main view... now it works proper! :-)

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.

UIScrollview : scroll with 2 fingers and not one

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.