How to add a cover photo above a table view (like path or everyme app) - cocoa-touch

I am trying to add a cover photo above a UITableView, so that the photo appears to be in a fixed position and the UITableView scrolls over the top of it.
Both Path and EveryMe have this feature.
Image 1: Initial Appearance
Image 2: Appearance when table is scrolled vertically (Note: the top of the image does not change)
http://imgur.com/a/b35IG

It seems to me that:
The image view is placed behind the table view, so it stays in a fixed position
The background of the table view is transparent, so the image can show through
The table has a very tall header (or first row) that also has a transparent background
The other cells in the table have an opaque background

Related

Move view hiding its side in android

Moving a view I try to hide all parts of view that cross some vertical line, so view starts to loose its width to 0.
The image describes better what I want.
I mean not just shrink a width with scaleX but hide, because this command compresses the photo horizontally, and I need to hide it without distortion.
How can I do it?
On the image a photo started to move left with translationX hiding line by line left side of the photo during this movement. Also, the photo is not at left edge of screen - it's on the center
View has left(and x) attribute in its LayoutParams.
How can I dynamically set the position of view in Android?
When left attribute is negative, it is hidden under the parent view.
If you want an animation, here is the document!
https://developer.android.com/develop/ui/views/animations/reposition-view

iOS8 UITableView with autolayout has a blank space above cells

I've created a UIViewController in a storyboard using autolayout and it has an embedded UITableView. For some reason there is white space above the table view section. My expectation is that the tableview would split all available space into cells and have cells starting right from the top.
What is causing the table view to add empty space above the first section when using auto layout and size classes?
(See screenshot below, the white space beneath "television" and above "Prototype cells" is the problem)
I've examined the constraints and insets, and cant see anything wrong with them:
UPDATE:
Here's the scene hierarchy
Try toggling the UIViewController property in Interface Builder named:
Adjust Scroll View Insets
If you drag a view into the table view it becomes the tableviews headerview that gives a space similar to what you see. Could this be the issue? Your posted layout looks correct.
Alternativley If you click on the Watch view controller in the hierarchy and switch in the simulated metrics section the top bar property from inferred to translucent navigation bar and back again this seems to move the cells down in the tableview when it is set to a translucent navigation bar

How to align the bottom of a UIView with the bottom of the screen always

I want a background image to always be aligned with the bottom of the screen regardless of screen size, iOS Version, or Personal Hotspot messages etc. But none of the interface builder alignment options seem to work in every case.
I have 2 different sized images to fit 3.5' and 4' retina which change via code but their alignment is always thrown off by 'Personal Hotspot' and other messages changing the size of the parent view.
My images are the size of the screen and should fill the whole screen always. There is a black area where tab bar and status bar will overlay.
There are buttons aligned with the background and everything gets thrown out by messages that resize the parent view.
I want the bottom of the UIImageView to be aligned with the bottom of the screen always.
have you tried the contentMode property?
theImageView.contentMode = UIViewContentModeBottom;
There is also a menu item for this in interface builder if you prefer to set it there.
then if you are using auto layout, simply add a bottom space constraint from your image view to the bottom layout guide.
If you're not using auto layout, a fixed bottom margin on the autoresizing mask should do the trick.

How to put background for UITableViewController

I wanna do something like THIS in my ipad application, what is the best way to do the followings:
The shadow under the upper bar.
The padding for the papers (top, left, right & bottom)
The background (as a notepad) : please think about the cells: they must still scrolled inside the paper and cropped before reaching to the paper bottom edge.
I'm looking for the optimal solution that avoids overriding as much as possible.
EDIT :
I tried to use UIViewController (with UITableVIew and has the delegate methods) inside UISplitViewController, And I tried adding UIImageView at the top of the table but this view will scroll with the cells and it'll hide when I scroll down. I tried to use viewForHeaderInSection function also for upper shadow (under the bar) but what about the papers bottom edge (what if I put one image including the shadow and the papers bottom edge and has the padding as a background for the UITableView or UITableViewController, and change this image when rotate to the portrait orientation? is this a good and possible solution?)
My guess:
Create the background in an image editing app
Cut 4 images, for header, footer, left and right sides
Create a UIViewController with 4 UIVIews and add the correct images as background
In the middle of all 4 add a UITableView
This way the images won't move and if you position the UIViews with the background properly, your TableView will scroll inside the notebook (assuming you are trying to create a notebook)
If you app is iOS 6.0 only, autolayout will be a great help. Check apple developer video on it to learn how to use this feature: WWDC 2012 Session 232 - Auto Layout by Example
One easy way to do this is from the xib:
1. In xib create image .On image view you can put background whatever you want as a image.
2. create table view above the image view and set table view background color as a clear color.
This will do it.

Vertical scroll bar of tableview

I have a UITableView, upon which I have placed an UIImageView, which scrolls vertically when the table is dragged, up or down depending on how it is dragged. (The image is separate and has not relation to what is present cells of the table view.)
UIScrollViewDelegate has been used for vertical scrolling.
Is there any way, the image can be moved along with the vertical scroll bar when the table is dragged? If so, how can this be achieved?
I think what you want to achieve is something similar to the scroller of Path.app.
Hava a look at this control: http://www.cocoacontrols.com/platforms/ios/controls/knpathtableviewcontroller
It's Open source and achieves this.