interface builder

More Interface Builder Woes

Sometimes I find when I am using Interface Builder the view I want to edit disappears.  You open the xib file click on the view you want to modify and nothing happens.  I have tried multiple clicking, clicking really HARD but I always get the same result. The view will not appear.  The issue appears most often when using a second screen, the view you want edit is on the second monitor, but you are semi unplugged at a coffee shop.

The easiest way to fix this is to click (gently) on the view you want to appear.  Now hit Cmd W to close the window.  Now click (normally) on the view and it will magically appear on your screen.

This has happened to me pretty often so I thought I would share the solution.

No comments

Interface Builder Woes

For my big sweat equity project that I am working on I get graphics from a graphic artist to use in the application.  But sometimes I need to create a background that matches the color of an image I have received.

Color DialogIt sounds easy and it should be easy.  I do not know if some setting of mine has been messed up or if  this has always been the case, but the colors in Interface Builder do not match the colors in the final application.  I even went back to some of the very first applications that I created and checked with DigitalColor Meter a neat application for returning the color under the mouse pointer.

The first thing I noticed is that the images once dropped into interface builder seem to be a bit darker.  To change the color of an item you click on the color swatch to open the color dialog box.  Now to match a color all you need to do is click on the magnifying glass and you can now use the magnifying glass to choose the color of any item on your desktop.  The first thing I tried was to naturally click on the graphic that I wanted to match in IB.  No go!  A recompile and then a view in simulator and the colors do not match.  I then open the graphics in preview as that displayed the image correctly.  I tried the color match again with the magnifying glass and still no match.  After trying many different things I noticed that when you use the rgb sliders you have the option to change the color space.  After selecting the matching color with the magnify glass the color space is set to “device RGB”.

I changed it to “generic RGB” and the slider values changed, but the color swatch remained the same color.  The next trick is to write down the color values when “device RGB” is selected and transfer those values to when “generic RGB” is selected.  When you make the change the color will not match in IB, but match in the final product.  I think I need to find out more about this problem.  I should not have to jump through these hoops.  Hopefully it is something simple.

Comments (2)
Powered by WordPress