Flickering AVPlayerController Edge (iOS) - ios

I have an AVPlayerController and have shifted it up 100px. The background of the video is solid white and the background in the app is solid white. Yet there's a weird flickering on the edge when it scrolls.
You can see the border right above the signup button and at the edge of the cell. I even tried putting a second view above it with a white stroke to hide it, and it just shifted it in more. The fact it's not a single color and instead flickers is super strange to me.
Any ideas how to fix it?
Video -
https://drive.google.com/file/d/1kBK92teYIm29_tAMFpMizdAMAVw8CknV/view?usp=sharing

As a quick solution, you can make screenshot of the video and put it on overlay view of the AVPlayerViewController while scrolling.
Edited: You can try to set overlay property as UIView with white background color and see if the gap is gone. It may looks like that:
UIView *overlay = [[UIView alloc] initWithFrame:self.myPlayerVC.bounds];
overlay.backgroundColor = [UIColor whiteColor];
self.myPlayerVC.contentOverlayView = overlay;

Related

How to modify the color of hairline of uinavigationbar

I've known the way to get the hairline view, which is a UIImageView, from this question:How to hide iOS7 UINavigationBar 1px bottom line
but, to modify this view's background color is so bad experience,
code like this:
[[self findHairlineImageViewUnder:self.navigationController.navigationBar] setBackgroundColor:[UIColor colorWithHexString:#"ff0000"]];
the findHairlineImageViewUnder method is from the answer link above
this works, but not always, even put in viewdidload,viewwillapear,viewDidLayoutSubviews, it will go back to original color at some scene, like after push and pop.
so, I'd like to ask if there is some perfect way to change the color of hairline of uinavigationbar, thanks.
now I found addd a subview to the hairline's superview did the trick and works fine
UIView* sv= [[UIView alloc] initWithFrame:[self findHairlineImageViewUnder:self.navigationController.navigationBar].frame];
sv.backgroundColor=[UIColor colorWithHexString:#"ff0000"];
[[self findHairlineImageViewUnder:self.navigationController.navigationBar].superview addSubview:sv];

Hard time setting color on status bar (iOS7) with transparency

I would like my status bar to be black and be 25% transparent. I understand that the status bar is transparent by default, and therefore takes on the color of the background. However when I set the views backgroundColor:
self.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:.75f];
The status bar is completely black.
I have a toolbar which I set to black with an alpha of .75 and I am just trying to get them to match:
self.toolBar.tintColor = [UIColor whiteColor];
self.toolBar.barTintColor = [UIColor blackColor];
self.toolBar.alpha = .75f;
Any reason why the background color on the UIView is not respecting the alpha component?
EDIT:
Based on comment that view does not underlap the status bar. If I set background to green it shows that it works:
However if I start to add transparency to the green color, it does not get lighter it gets darker. Seems like the default is to be black underneath my only UIView, not white.
self.view.backgroundColor = [[UIColor greenColor] colorWithAlphaComponent:.25];
The status bar in iOS 7 is completely transparent. The problem may be that your view and the toolbar are not correctly underlapping the status bar. So you are seeing the black window behind it. (Or, in fact, you may setting the size of the window incorrectly, in which case you are seeing nothing at all behind the status bar.)
If the view does underlap the status bar, then you need to set the bar positioning of the toolbar to Top Attached so that its height increases up underneath the status bar. We should not be seeing a separate color for the status bar; it should appear to overlay your interface, lying in front of the top of the toolbar.

UISearchDisplayController TableView goes black after erasing text

I have a UISearchDisplayController that goes black after erasing search-text.
These pictures explain my issue:
Add an a to the searchbar
Removes the a from the searchbar
I tried these settings in ViewDidLoad, but it's not working.
self.searchDisplayController.searchResultsTableView.backgroundColor = [UIColor clearColor];
self.searchDisplayController.searchResultsTableView.backgroundColor = [UIColor clearColor];
Actually the searchResultsTableView is not shown when the search bar is empty. Instead a semi transparent view is shown so that you can see the underlying view (usually the view of the VC that invokes the search). In your case I guess the underlying view is black so it doesn't matter that the search view is semi transparent :)
Setting its background to white color should do the trick.

PageControl backgroundColor when used in UIPageViewController

I'm trying to implement a simple tutorial using UIPageViewController in iOS7. I implement all methods in UIPageViewControllerDataSource and it gives me a UIPageControl. Everything works except that the pageControl's background is not transparent so it blocks part of the other views behind it.
I try to change the pageControl's appearance with the following code
pageControl.backgroundColor = [UIColor greenColor]; //works, background is green
pageControl.backgroundColor = [UIColor clearColor]; //not working, background is black.
//updates
It turns out that the black color is the background color of the PageControl's layer. And this Page Control layer is not on top of my own ViewControllers that I used for pages. They are in parallel.So no matter how I modify its colors, I cannot get my ViewControllers to take the full screen.
Is there an easy way to move the PageControl on top of my ViewControllers?
It could be the background of the parent view. I had a similar situation where the background color was actually the background of my parent control, not my own. Here is a tool I use that helped me narrow this down : http://www.sparkinspector.com. Here is another tool that does the same thing : http://revealapp.com.
Also one more thing - not sure if this would apply to your case, but it could be the background layer that might need its color set
CALayer *layer = self.layer;
[layer setBackgroundColor:[UIColor clearColor]];
if you set something to be clear color, the background color then depends on whatever is on the background, the view the page control is in (usually a uipagecontrol) has no background, and this is why you're seeing it as black.

Strange border in UITableView

I'm getting an odd behaviour with UITableView that maybe someone can help me with.
I have a UITableView. I then do:
table.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:#"tablebg.png"]];
cell.backgroundColor = [UIColor clearColor];
This works as expected, except I'm getting a strange white border along the right and bottom of the table (see image).
Any ideas?
Seems like the tableview isn't aligned with the very superview (view) edge. Make it a bit wider and taller. I would temporarily set the view background color to something else so that you can see where the table extends to.
It seems that your are using a PNG with alpha different from 0 and I have experimented the same issue with some images. Try:
table.backgroundView.alpha = 1.

Resources