Masked scrollable button list - ios

I want to implement scrollable button list which are displayed inside popup. I would need some kind of masking, but buttons should also work inside mask. Any suggestions how to do it?

It is possible to achieve this with CCMask class but this is pretty slow way to do it as mask has to be applied every update.
If you use this class you will also loose button detection so you will have to play with touch detection. You will also nead a lot of tweaks to position mask & objects exactly where you want.
When you will finish everything it will not be as good as you thought it will be .. The feeling of scrolling will just not be OK, since there will be masking lag ...
It is better to hide hidden parts of scrollable items with some kind of "window" images

Related

Want a UIVisualEffectView affected by content above as well as below it?

I have a UIVisualEffectView with a UIBlurEffect effect as a pinned UICollectionViewCell in a UICollectionView.
The blur is masked with an icon so that the icon appears in a subtle shimmery way, responding to whatever it is drawn on top of.
The effect is on top of the collection's background. As it stays pinned and the varying background scrolls underneath, it gently changes to reflect the background and looks very nice.
However, except for the collections's scrolling background, most content is drawn in front of the blur effect. This is necessary because that other content is more important and shouldn't be obscured.
Even though it is behind the more important content, I'd like the effect view to reflect the content that is scrolling in front of it. Any suggestions for how this might be made to work?
Ideas:
Could I grab a chunk from the previously drawn frame and draw this under the effect view? How would I do that?
Could I render the whole collection view, apply the blur, and then render everything that should be on top of the blur a second time? How can I make that efficient?!
Thanks.
I went with a slightly refined version of the second option.
I added some duplicate cells to the collection view that are rendered behind the blur, and then also in front. I've only done this for one of my cell types with lots of colour in it. It works pretty well.
If you have a better approach I'll happily assign you the correct answer.

How to do Scrolling Lyrics with animation?

In my app, I want to add scrolling lyrics, like UIPickerView rolling lyrics, according to the song. I tried Cloud Label In Code4App (http://code4app.net/ios/Tab-cloud/5235d23f6803fa2f7b000000) but I'm not understanding that code since I'm new to Obj-C!
Can anyone please help me or suggest tutorials?
I don't think you're going to be able to use a UIPickerView for what you're describing since I don't think there's any way to do a slow controlled scroll on a UIPickerView, especially while changing the text characteristics continuously.
I think you might be better off using a UITableView, animating the content offset to scroll, and using attributed text to change the highlights.
I don't know how to get that circular UIPickerView "look" you're trying to achieve though. That might be more complicated...
I agree with Lyndsey that a picker view is not the right tool for what you are trying to do.
If you are a beginner at Objective C this is probably over your head. Way, way over your head even.
You would need to use Core Animation on the layers of a set of text views, and rotate those views around the Y axis, with the center of rotation being behind the view. You'd need to manipulate the transformation matrixes that you apply to each layer to get a perspective effect (applying a value of around -1/500.0 to the m34 entry in the CATransform3D)
For now I would suggest giving up on 3D rolling perspective, and just using UIView animation (look at the method animateWithDuration:animations: and it's cousins. That's nice and easy to use.

How to apply UIView shifts when scrolling between pages

i'm trying to apply a shift effect to subviews of a UIView, but those shifts should'n have the same phase. A good example of that is the welcome screen in SoundClound.
As you can see, in the second image i'm scrolling to the second page, and the label slides more than the image (so it looks that the label moves faster than the image). So the subviews lose the alignment when scrolling, but recover it back if we stop the swipe.
Does anyone know how this effect is named? and where can i find some help to implement it?
Thanks a lot!
"Parallax scrolling" is what you want to search for.
Basically it is done by moving foreground objects faster background objects to simulate depth.
Check out http://blog.denivip.ru/index.php/2013/08/parallax-in-ios-applications/?lang=en for a starting point!

How to clip image to UIView animating over it?

I've been looking around here and seeing lots of questions that seem related, but I haven't found anything that's exactly what I need.
I have three UIViews that are animating inside a custom viewController. I want there to be a static background inside the viewController that is only revealed within the clipping bounds of the UIViews.
It's kind of like spotlights on a prison yard: the background should stay in one place, but as the spotlights move you can see different parts of it. Except that I don't need circles, regular old UIView frames are fine.
For instance, it seems like what I need is in the answer to this question: How to achieve dynamic UIView masking?
...the answerer provides a link to a page that shows how to statically mask an image, and then the answerer says "But personally I think i would make 2 UIImage views and crop the content of the draggable UIView"--without any info on how to do that.
How do you do that?

Transparent custom UITableViewCell

I've finally finished my first large application, the only problem is that I've focued a lot on design, and I'm using custom nibs as cells with transparent backgrounds. When I tried testing the application on my iPhone, the performance was terrible.
Is there any way to get better scrolling performance while using transparent cells with a ImageView behind the UITableView?
I've read two articles mostly:
blog.atebits.com/2008/12/fast-scrolling-in-tweetie-with-uitableview/
cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html
Looks good, but what if I want to use transparent cells?
a) Uses solid color.
b) Uses imageview as background.
Any help will be greatly appreciated. I want to get this baby released as soon as possible, but the performance as it is now is terrible!
First off, stop using nibs. Every time a cell is created, you're now hitting the disk in order to unarchive the nib. 3.1 will actually make this better, but until then, please create your cell in code.
Secondly, remove transparency wherever you can. Anything that doesn't need to be transparent, shouldn't be. And anything that isn't transparent should have the opaque property set to YES.
A third suggestion is if you're using a lot of subviews, you will see a performance benefit by using a custom view to draw everything instead of a bunch of subviews. If you choose to go this route, you should consider how it behaves when rotating to landscape mode (e.g. how the stretch action occurs), or if you have any controls that need to handle touches separately from the cell itself.

Resources