Make bottom part of UITextField(UIScrollView) transparent - iphone

Here's a good example that sums it up:
This is a UITextField that contains long text, so the user is able to scroll down to view the rest of the text.
How can I make the bottom rows appear "transparent"?
UITextField only allows setting global text properties (like color, font size, etc).

The trick is to create a CALayer containing a gradient and use it as mask layer of your UIView's layer (alpha values of the mask layer will be used.) see this answer: UIView border with fade or blur effect

This will help you.Not sure but some functionality like you want.
Hope this helps you.
All the best !!!

Related

UITableCell Centered with Shadow

I would like to build my UITableView in similar way to Google+ app, which has:
UITableCell width of about 310 I guess but the important thing is they centered, I dont know how to achieve that...
There is a 1-2 pixels of shadow beneath the cell.
Please help me to understand how to position my cells the same way and how to add the shadow effect.
Thanks.
UITableCell width of about 310 I guess but the important thing is they centered, I dont know how to achieve that... : You'll have to create a own subclass of UITableViewCell. Here you can position the controls which you need however you need. You can achieve the above shown UITableView only by creating your custom UITableViewCell. You can refer this
There is a 1-2 pixels of shadow beneath the cell. : This can be possible only by using the image with shadow as a background of your customized UITableViewCell.
OK so I finally got the solution.
I used a background image for each cell that takes the whole width (I kind of cheated) and incorporate the shadow and the 10px separation in the background image.
Of course I had to use Photoshop or similar program to achieve that. so the UITableView and the Cell width should be 320, and the height of the cell should contain the shadow and the separation as well.
This is how I make the table to look exactly like I want it to be!!

Custom UIButton image buttontype

If you can set a button's image even if it's button type is rounded rectangle, then what is the purpose of the button type to begin with? I usually use the custom button type, but does this in fact actually make a difference?
You can use UIButtonType to make a button of a standard type: a detail disclosure, an info, and so on. In these cases you would not need to set the image at all - the system will do it for you automatically.
When you pick rounded rectangle and set the image, the image would be clipped to the rounded rectangle's border; when you pick custom style, there will be no clipping.
Yes this definitely makes a difference. For example, if you have two buttons, One RoundRect and the other 2nd Custom.
Try to set a background color on both buttons. You will see the difference. The Custom Button has occupied the background color properly and the round rect has few issues.
Even with background Image, you can check both. The Custom button has no issues with setting images, as it has a transparent background and the round rect will have an issue on its corners.
UIButtonType definitely have difference of this.
I hope this is what you are looking for.

Make UIView and subviews translucent as one layer, not individually

When setting the alpha of a UIView (on iOS) it sets each subview to the same value, but composites them with that alpha on top of their respective superviews. So the subviews are blended with their superviews.
I don't want this to happen. I want the opacity to be applied to the UIView as a whole, not to each individual view. I want to achieve the same effect as, say, CSS3's opacity, or applying opacity to a group of layers in Photoshop, rather than to each layer individually.
The complexity however is that in this UIView is a UITableView and others that need to be interactive. And it's not viable to have the view that is supposed to be behind this view on top instead.
My question is: What's the best way to achieve this?
Thank you!
Alec
There's a 'Renders with group opacity' setting in Info.plist
Documentation here:
http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html
(Search for the mentioned setting).

Mask an UITextView / UIView

Is it generally possible with an UITextView to have a mask which I can animate at runtime? Imagine a flash light effect: You have a circle mask and then move this circle around -- and only whatever is in the circle is shown of the UITextView.
Sorry to be so general, but I was only wondering if this is generally possible with an UITextView and where I would need to start to achieve such an effect. I found this: Mask UIView and this Mask text inside UITextView but neither is really about animating a mask at runtime.
Thanks!
Yes this is completely possible and easy.
It is very likely you *do not need the difficult concept of masks, as explained in the links you mention.
All you have to do is make another UIView (just do it in IB), and then move that new UIView around as you see fit.
It's just that easy. Hope it helps.

What's this UI element?

What's the UI element that is top of that number buttons to display number ? (which is in light blue color)
It looks like a UINavigationBar with a prompt. However, the location of the gloss (which differs from your typical UINavigationBar) and the centering of the numbers (not shown) makes me think it is a custom view.
If you're trying to replicate it, I'd suggest starting with a UIView. Add a UIImageView with appropriate image for the the blue background and a UILabel for the text. Or, instead of the UIImageView, you could draw the background in the UIView's drawRect: method.