Transparency in UIPopoverController with iOS8 and table views - uitableview

I have a UITableView inside a UIPopover. On iOS7, the tableview would be semi-transparent but on iOS8 it doesn't appear to have any transparency.
If I insert a UICollectionView instead and set it's backgroundColor to clearColor then it is all nicely semi transparent etc. Obviously I've tried the same trick on the table view - but no cigar.
Anyone know why this is?
NB: The reason I noticed it was because in my app, I have a table view (in a popover) then when you select a row, it pushes in a collection view - and the transition is horrific as it goes from opaque table view to semi transparent collection view.
Thanks.

Related

iOS Modal ViewController with Transparent BG and Opaque Foreground

I am trying to create a Modal View in XCode Storyboard with background semi-transparent. On this view I have placed a TableView which I want to appear with opaque background. But unfortunately, both are appearing either semi-transparent or opaque.
Is there any workaround to this?
P.S. I am using Swift as a programming language.
Don't make the tableview a child view of your transparent view,your view hierarchy should be like
View
TransparentView
TableView

Add a UIImageView to the back of NavigationBar (NOT background image)

I am trying to add a UIImageView to the back of a navigation bar.
The reason is because I want to create a UITableView whose navigation bar is actually a picture (with back button on the left) but I want the picture to scroll with the tableview and when the picture is fully scrolled out. The navigation bar is shown as per normal.
My solution to this problem:
Add a UIImageView to the top of the UITableView and make the navigation bar transparent. Set a contentOffset for the UITableView which is a subclass of UIScrollView so that when the view is presented, it looks like the picture is filling the navigation status bar.
Problem:
If I scroll up, instead of bouncing back, the transparent status bar is shown (with a color of the background as it is transparent).
Possible way to solve this new problem:
I was thinking of trying to limit the ScrollView size to get around with problem but failed.
So I feel is it possible to add the UIImageView to the "back" of the navigation bar so that it is there without any offset? Since that way, my life will be much easier.
Any suggestions on solving this or another new approach to get the same UI/effect?
Related question.
I would do this by adding either a table header or cell at the top of the table which contains your image.
Create the table view so that it extends all the way to the top of the screen. Extend Under Top Bars option. I have not done this with a UITableViewController but I have done this with a UITableView embedded inside a UIViewController's view with the top constraint set to 0 for the view rather than the top layout guide.
Now when you run this your table will fill the whole screen and the top header or cell will be at the top showing your picture.
When you scroll you can either use the UIScrollViewDelegate to detect the movement or implement tableView:didEndDisplayingCell:forRowAtIndexPath:
I'm not 100% sure when you want the navigation bar to go non clear. If its when the image goes off screen then didEndDisplayingCell should be good. If its when the cell bottom passed under the bottom of the navigation bar then scroll view might be your only option.
This will also bounce as you expect when you pull down and it should snap back to the top.
Hope this helps.

iOS - pushViewController without sliding Background Image

Messing around with pushViewcontroller due to one of the awkward requirement :/
So there is a rootViewcontroller with 1 Background Image and UITableView with custom cells and there is a detailViewController with similar backgruound image with different views.
Requirement is:
On tap of UITableViewCell... the whole navigation animation should not affect the background image. Background Image should stay as it is and all other view should slide.
How I can slide only UITableView and display detail screen without changing background image ?
There is one possible solution is just add 2 child view controller and apply slide animation on both child. But in that case I have to keep on removing the child. I can't remove child because on tap of custom bottom back button I have to display the 1st screen instantly.
Any other possible solution or improvement ?
You can wrap your UINavigationController in a custom view controller that contains the background image. Then make sure your content view, as well as the pushed controller's views have a clear background.

iPhone : How to make transparent XIB from which we can see previous view's uitableview

I want to make transparent xib view from which we can see previous view's uitableview.
I have one view which contain uitableview (listView.xib), from its one of navigation item, we can open one popup view or we can say that one another view(filterView.xib). I want to make this filterView.xib as transparent that we can see previous list of data - listView.xib.
its Works in IOS7 as well <= IOS7?
do it same thing and set the color of the view to clear color and change the alpha value to .5

How do I mimic the background color of this table view?

Apple ships an app named “Contacts” on every iOS device. On the iPhone and iPod touch, it has a very particular way of styling the area above the search bar:
How is this coloring accomplished? Specifically, how is the color only visible at the top of the table view, and not at the bottom? Setting the backgroundColor property of the table view or its backgroundView does not achieve the desired result, either.
I would just create a UIView with gray backgroundColor containing a UISearchBar at the bottom of it, and set that to the tableHeaderView of your UITableView.
Maybe it's another view in a UIScrollView? (If so, above contentOffset.)

Resources