In a table view can we give zoom in and zoom out effect? - iphone

I want to zoom the table view to see the contents of the cell???i want to know whether it is possible???any kind of suggesstion is highly appreciated

Important: You should not embed UIWebView or UITableView objects in UIScrollView objects. If you do so, unexpected behavior can result because touch events for the two objects can be mixed up and wrongly handled.
From UIScrollView documentation
Edit,
May be you should implement something like and alertView when user taps on cell. Present an animated scroll view and there do the zooming.

Related

Custom UITableView Animation

Is it possible to change the scrolling on a UITableView? Such as the following?
http://dribbble.com/shots/1176252-Events-iOS7?list=users
In this example, the cells have an accordion effect to them. It's like when the user drags a cell from the top of the page down the ones underneath the dragged location pinch into it, and the ones above it pull away.
I feel like I could do this if I were just use UIView's as cells and custom animate them but I believe that I would be wasting so much making a ton of UIViews.
Any tips, or direction would be so helpful. Thanks!

How to hide a part of my UIView?

I have few other UI in my UIView and i have a UIButton on the top which i want to be hidden until unless the user scrolls to see the content on the very top and then display the UIButton.
Is there a way to implement this.
Thanks,
UIView (and thus everything sub-classing it) has a hidden property, this includes a UIButton. You can simply set this to YES/NO to hide/show something to the user.
After that the real question comes down to the show/hide criteria and how to measure it. If you are using a UIScrollView then you can add/implement UIScrollViewDelegate. This will give you methods like scrollViewDidScrollToTop: to check if the user scrolled to the top.
Keep track of the previous scroll offset so that with each scroll you can compute the delta, telling you whether the user scrolled up or down. With that, you can toggle the button's "hidden" property. Hope that helps.

Better to use UIScrollView or UITableView for horizontal buttons?

I have a page enabled scrollview on an iPad. On the first page, I have a child scrollview that scrolls horizontally through image buttons. The buttons scroll the outer scroll view to the correct page. Its basically like a table of contents that jumps to the correct page.
My end goal is to be able to categorize the buttons seen in the child scroll view. So there would be a segmented control that changes what buttons you can see. So maybe one category would be ALL, and another category would be A-M, and another would be N-Z for example.
My question is, should I use a uiscrollview or a uitableview?
Right now I use a scrollview and it is really easy to get the buttons in. I could implement the different categories kind of gimmicky by having all of the buttons in the scrollview and then just showing or hiding the buttons accordingly. I feel that it'd be bad memory usage though.
For a uiscrollview i was looking at using EasyTableView, butI'm not 100% sure if this is compatible with what i want to do or if it'd even be better.
Any ideas for what the best way to implement this is? Specifically, I'm not sure of the best way to change the buttons when I change categories.
Thanks!
Use a tableview when you are dealing with data that is best expressed as sections and rows.
I think for your situation I'd have a UIView subclass that can display the images you need for a given category. Stick that on the outer scrollview as needed. You can keep memory low by only keeping the currently visible view and the ones on either side on the scrollview. When you scroll to a new location you can recreate the view needed for that page, and the ones surrounding it. Then you release the ones that are far away and let the system reclaim their memory if needed.

Recreate UIPickerView with just one row showing

I need a "PickerView", that behaves like a normal UIPickerView, but only shows one row of data and has a custom design.
Something like you see in the image, showing the transition from subview 1 to subview 2. After the user lifts his finger and after the scrolling stops, only one subview will be shown:
IMAGE
So basically a scrollview which:
is endless in both, positive and negative directions by showing the same entries over and over
uses paging across several subviews
only shows one subview when not scrolling, and no more than two subviews when scrolling.
I can get a endless scrollview to work, but not with paging enabled. Paging will always limit my scrolling to the next subview.
So I'm thinking about creating my own UIView subclass which custom scrolling behaviour to mimic a UIPickerView. But before doing so, I wanted to get some opinions about the idea in general. Is creating a custom UIView the right way to go? Anyone has some experience with the expected performace? (There will be timers to handle the scrolling algorithm, which has to be recreated of course... :)
Another approach would be to subclass UIScrolView and implement the paging myself. I know when the scrollView starts decelerating
, so maybe there is a way to overwrite the contentOffset to have it scroll into the right position...?!
Any help is appreciated! Thanks!
Here is a great custom component, which seems to be able to do everything you need:
http://dev.doukasd.com/2011/04/infinite-scrolling-dial-control-for-ios/
It's not endless, but rather a modified UITableView with a huge number of cells.
Would it be feasible to just use a UIPickerView, but clipped to the middle row? You could turn off showsSelectionIndicator to remove the overlay and have the delegate pass back custom row views.

Zoom functionality on a UITableView

I have a UITableView in one of my views which is a bit small and I can't increase its height (as its size is fixed and there are other controllers too). Can I provide the zoom in/zoom out functionality in it (same as we get on map view) ? If yes, how ?
During my search I came to know that it is possible with scroll view but I don't know how. I added a scroll view to my view and on the scroll view I added my tableview but the zoom in/zoom out functionality does not work there. Please help me out
This is for iPhone iOS 4.1.
Thanks in advance
The UITableView will be consuming all the touch events in the table view. What you need to do to get around this is to intercept the touch events, identify zoom gestures, and then pass any events that aren't zoom gestures to the table view.
You can subclass UIWindow to add the touch interceptors. Look at the sendEvent method.