Can't set backgroundColor property of UITableView in Attributes inspector after update to Xcode7-beta4 - interface-builder

I'm trying to set backgroundColor property of UITableView with Interface Builder' Attributes Inspector after update to Xcode7-beta4 and it doesn't seem to work.
Steps to reproduce:
Create new single view project
Create UITableViewController with few static cells as initial controller of storyboard
Set UITableView's background in Attributes inspector
It works if I set backgroundColor in User Defined Runtime Attributes.
Should I submit a bug report?

The issue was resolved in Xcode7-beta5.

Related

How to remove translucency that appairs on some parts of a NSTableView?

I'm working on a project for macOS with Storyboards where I have a custom view containing a NSTableView and some other controls.
The customView background is colored in viewWillAppear():
backgroundCustomView.layer?.backgroundColor = NSColor.white.cgColor
The problem is that the items of the NSTableView appears with some translucent parts inside them.
I would like to prefer that the NSTableView appears without any translucency (this is the reason because I put a custom view under the NSTableView).
I tried to change in IB about all what I think could be related options without any luck.
PS
The discontinued translucency between the items is due by the cell spacing option.
You need to specified that you view needs a layer as its backing store
backgroundCustomView.wantsLayer = true
backgroundCustomView.layer?.backgroundColor = NSColor.white.cgColor
More info at wantsLayer property documentation page

Set default values for inherited IB-properties

I wrote a UILabel-subclass called Badge that is supposed to display notifications similar to Apple's icon-badges. I made Badge customizable in Interface Builder by prefixing it with #IBDesignable and its properties with #IBInspectable. The setup works both from code and IB, where it is rendering properly. The only thing I'm struggling with is setting up new default-values for the inherited #IBDesignable-properties such as text and backgroundColor. I have tried to set these values in the init-methods and also prepareForInterfaceBuilder(), but the values in the Attributes Inspector in the UILabel and UIView-section remain unchanged.
Here my question:
Is it possible to change/override the UILabel's default text found in the Attributes Inspector so that a custom text instead of "Label" is rendered in IB for my subclass by default?

Xcode add collection view cell to collection view on interface builder

I am relatively new to using XCode interface builder.
When trying to drag a collection view cell onto an empty collection view, the interface builder refuses to do so.
Please have a look at attached screenshot:
Am I doing anything wrong?
Note that I can do the same on a storyboard but not on a normal xib file.
You can only add a UICollectionViewCell inside a UICollectionView when working on a Storyboard file. For sure, you must be using a single nib file and that's why it isn't working.
If you wanna use a custom UICollectionViewCell, then you must create a subclass of UICollectionViewCell. When subclassing UICollectionViewCell don't forget to check the box that says "Also create XIB file" beneath the expandable menu of "Subclass of". Now, try to drag a UICollecionViewCell onto the canvas and custom it the way you want.
Another posibility would be using a Storyboard file. Try setting your UICollectionView inside a scene in the storyboard and then drag a UICollectionViewCell inside it. When dragged, create a UICollectionViewCell subclass and assign it to the UICollectionViewCell you dragged previously inside your CollectionView in the Identity inspector.
In either case, don't forget to set the reuse identifier of your UICollectionViewCell in the Attributes inspector :)
Here is a code sample from Apple of how to create a UICollectionView with a custom UICollectionViewCell using a storyboard.
https://developer.apple.com/library/ios/samplecode/CollectionView-Simple/Introduction/Intro.html#//apple_ref/doc/uid/DTS40012860
Hope this helps :-)

Change appearance of a popover created using a popover segue in OS X

I'm trying to use storyboards to build a simple app for Yosemite. Creating a popover segue is easy - the segue is created from a button click to an NSViewController in my storyboard, and the Style is set to Popover. This works great, but the trouble is, I'd like to change the appearance of this popover. It seems to be defaulting to a Vibrant Dark appearance, but I'd like it to be Vibrant Light or Aqua. I assume what is happening here is that behind the scenes, an NSPopover is being created to contain the view controller that I am displaying with my segue, but I can't figure out how to get access to this NSPopover object - the storyboard only gives me access to the view controller that I am displaying, and there isn't any NSPopover object available to use in interface builder.
All I want to do is change the appearance of this popover I'm creating in my storyboard...Any suggestions? Thanks!
Override viewWillAppear in your view controller and update the appearance of the view's window:
override func viewWillAppear() {
self.view.window?.appearance = NSAppearance(named: NSAppearanceNameVibrantDark)
}
your appearance can be any of the standard appearances

xCode can't Control-drag into .m file

I'm trying to change the results field in the sample app SimpleURLConnections in the AppleDeveloper Library from an Image View Object in the GetController.m to a Text View so that it will display responses that aren't images. (I know some code that checks the response type also needs to change.)
When I drag a Text View object (or ANY object) from the Utilities pane to the MainWindow.xib in the editor pane, it appears to be created ok but when I try to Control drag from the Text View into the #property area of GetController.m, I don't get any "Insert Outlet.." popup or new entry in the GetController.m file? (By experimentation, I can get it to populate an IBOutlet in the AppDelegate.m file.
What am I doing wrong?
Thanks,
Rick
It may be because you are doing it wrong.You added the textview to mainWindow and Getcontroller is a controller entity[its a view controller i think.] .An xib will be connected to the outlet if and only if it has the custom class correctly set to that class.
Add a view controller with custom class in attribute inspector set to that Getcontroller and then you can connect the outlet
When u drag the control to the **.m , u should press the key "control",

Resources