iOS 7 - Storyboards. Why is it impossible to set tableViewCell selection color - ios7

In general Storyboards are an awesome hugely productive tool that I cannot live without. But ...
I am pulling my hair out trying to do something I assumed would be trivially simple: set the selection color for a tableView cell. Impossible.
My storyboard is simple: navigationController --root controller--> tableViewController
Here are screenshots.
The app. Notice the pale, sickly grey cell selection color that should be blue.
Storyboard screenshots.
NavigationController. Notice I set the nav bar to opaque.
TableViewController. Again, solid opaque nav bar.
TableViewCell. Notice I set selection color to blue not pale, sickly grey.
Can someone please explain to me how to convince Storyboard how to do this.
Thanks.

In your storyboard, do the following:
Place a UIView as a background view of your prototype cell. This should be below your UILabels. Change its background color to your desired color. (Background NOT Tint)
Select your prototype cell and go to its connections inspector (Command + Alt + 6).
Drag the selectedBackgroundView outlet into your just placed background view.
Source: How to change background selected color storyboard static cells

Related

View with auto layout doesn't resize

I have a static UITableViewCell in a containerView with auto layout applied. In the containerView is a UIView. I set the border color of the containerView to orange, and the view to green. When I run it on the simulator I get the following results:
Constraints:
Portrait:
Landscape:
The green border color is applied to the outer view.
When the the simulator goes in landscape mode, the views' width doesn't become as small as it should be; as you can see the views' right green border is not shown. (I have the same issue with the second UISegmentedControl.) Can someone please explain why this happens and provide a solution?
Edit
When in portrait mode, the containerView (and another view) are 1 on top of another. When in landscape mode, they are side by side. That's why in landscape mode, the containerView is smaller.
As per your requirements
first UISegmentedControl
second UISegmentedControl
Follow these links Autolayout or Autolayout programatically
This might helps you :)

Nothing happens if press on transparent part of uicollectionviewcell in iOS8 Today Extension

I have widget with collection of icons and these icons are on transparent background. UICollectionViewCell is also transparent. The problem is that if press on transparent part of the cell -
(void)collectionView:didSelectItemAtIndexPath:
is not called.
But if change cell's backgroundView to black color with alpha = 0.01 everything works well. I have a feeling that alpha solution is not the best one. Am I doing something wrong or anybody have better solution?
You NEED the 0.01 alpha workaround.
According to Apple's DTS, it is an iOS 8 bug.
The solution for the moment is to create a empty text label as a background view, or add it in the .xib file as a first view.

Custom UICollectionViewCell Subview Layout Issue

I have a custom UICollectionViewCell class that sets the background view of the cell to a downloaded image and also a UILabel added to it that sits neatly at the bottom of the cell and is slightly transparent (this label is the title of the image). It looks great in portrait but when I rotate my device to landscape the UILabel stays in its position while the custom cell resizes itself to better fit the screen. I have my UILabel fully constrained to the cell so I don't know why it isn't resizing to always fit the width of the cell whether the device is in portrait/landscape.
I've attached these pictures below to better illustrate what exactly is happening:
I figured it out - for anyone who is also wondering the same thing, this is what I did:
I overrode the layoutSubviews method in my custom UICollectionViewCell class and forced my UILabel to stick to width and bottom of the cell.
It was weird because before I upgraded to xCode 6 and iOS 8 this was working perfectly without the need of this solution (the constraints within the storyboard worked), but now I had to use this approach.
Cheers!

how to fill color throughout the NSTableHeaderView of view based NSoutlineview

i had created a view based outline view as here. i filled the row by black color, but the background of disclosure button was not appearing with black background. how to fix this.
i set outlineview indentation as 0 in inspector window .problem solved.

Highlighting or filling in empty white spaces of a UIViewController

I have a UIViewController that initially is of a white background and allows the user to color in the UIImageView of a certain color by touch events. When all is done, I would like a way to highlight or show the uncolored areas (the remaining white areas) of the UIImageView. Is there a nice way to implement this. I have tried messing with CGBitMap methods but I have not been successful without any errors in code.
Thanks!
Could you simply change the background color of your UIViewController?