iOS - How can I perform the visual effects like Clear app? - iphone

I was wondering how can I make visual effects like the ones in the Clear app or the one you can perform in the Twitter app on iPad (by pinching between two rows in a tableview) ?
Thanks a lot for your answers.

There is a sample project on Github, JTGestureBasedTableViewDemo
Link: https://github.com/mystcolor/JTGestureBasedTableViewDemo

You could look into this component:
http://cocoacontrols.com/platforms/ios/controls/pulltorefreshtransform
See how the top row transform is implemented and use the idea for your needs. You'll probably need to use pinch gestures to make this work like in "Clear"
Hope I gave you a good starting point. Good luck

Related

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)

iOS iPhone finger paint-like app, is there a built-in canvas or open source projects to help me get started?

I need to implement on-screen drawing feature within one of my apps. I would imagine it would be an on-screen transparent overlay. I'm looking to be able to trace the finger path and leave a line, select colors and have erase/undo feature.
I did some research of what's currently on the app store, and a lot of those apps look similar and use similar brushes.
Something tells me that they look too much alike for this to be a coincidence. Does apple provide any built-in finger painting canvas, or are there some widely-known open source projects for on-screen drawing?
Thank you!
I ran into the same thing while looking for examples when I got started with drawing, so I released my efforts as a sample project called SimpleDrawing. I tried to keep things basic while supporting most/all of the standard drawing tools and operations.
There is the GLPaint project, which you can get here.
Other than that, you could use CoreGraphics & -touchesBegan:withEvent: if you wanted.

iPhone SDK - Expanding Buttons like in the camera app

I am curious as to whether or not there is an open source solution to replicate the flash button in the iOS camera applicaiton.
I have seem many other apps use this, but there doesn't seem to be a native way, so I assume there is a common source out there.
It is possible to get the flash button by using UIImagePickerController class, but most of the camera apps out there don't seem to be using this (or perhaps they subclass it, which is against apple's terms).
I am looking for a way to replicate the expanding behavior of the button. Any thoughts?
It doesn't sound too hard.
The way I'd do it is to separate the right curve of the button (as images), and make a UIView that has the left part of the button and the right curve as subviews.
When it's tapped, slide the right curve and animate the extra buttons in.
You could use a stretchable UIImage (see UIImage documentation) and then just animate the frame changing.
In the Apple 2010 WWDC Sample code (downloadable via iTunes, otherwise I'd post it here), there are several sample applications which use this control. They call the class ExpandyButton. I realize I'm answering my question, but hopefully someone out there can find this useful.
While looking for a similar solution to this problem I came across this code which was extremely helpful. Similar to ExpandyButton it fit my needs better.
https://github.com/ddebin/DDExpandableButton

Customize Curl animation in iphone?

I want to set animation for my UIView. I am using CurlUp animation for that. My requirement is to use CurlLeft and CurlRight. These are not available in CoreAnimation as I know. So is there any way by which I can handle the CurlLeft and CurlRight. I don't know a lot about OpenGl. But I don't have any problem with that too. Please guide me and provide me any link by which I can handle CurlLeft and right animation using either OpenGL or CoreAnimation.
Thanks a Lot.
For page turning animations, Ole Begemann has done something like that. His code is available on Github. See my answer to this question for a link.
iBook page flip transaction
His sample project is available for download and shows page curling left and right.

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.