I realize this is a painfully noob question but I just don't know what to do.
I'm trying to rotate my view in Interface Builder, and everyone refers to the rotate icon in the top right of the view.
My Interface Builder doesn't have this icon. See screenshot:
What am I doing wrong? Do I have to enable this in preferences or something? I'm using Interface Builder 3.2.2
Just alter the dimensions of the view. You will have to create a new one and connect it as an IBOutlet of the correct objects, but make it's dimensions 480x320 instead of 320x480.
Related
I use a NSCollectionView as a toolbox (like in Xcode's Interface Builder). When dragging a tool out of the collection view I would like to change the "dragging image" under the mouse cursor into the real tool image. It should behave similar to Interface Builder when dragging a UI item into the users canvas. Es expected, it should change back to the previous image when I move the mouse back into the collection view.
I tried several delegate methods, but I can't see a way to change the cursor image during mouse movement.
Any suggestions?
Thanks to all! :-)
Regards,
Ulf
make a subclass of nscollectionview
override
func beginDraggingSession(with items: [NSDraggingItem], event: NSEvent, source: NSDraggingSource) -> NSDraggingSession
use setDraggingFrame(_:contents:)
you can get the mouse point from event.locatoinInWindow (dont forget converting to your collectionview cordinate)
I try to insert and resize a MKMapView via interface builder (xcode 4.5).
However, the simulator shows different size/position compare to what we see in IB.
Any hint where could go wrong ?
Thanks.
http://i463.photobucket.com/albums/qq355/popov_kai/Untitled3.png
I'd say your textfield is pushed down by the navigation bar but the map is not. So in Interface Builder find the setting to simulate a navigation bar in your UI and then position your map according to that.
I want to know exactly where I am placing my images programatically, and therefore need to know the coordinates of my storyboard.
Is there a way to view these from the interface builder in Xcode?
Your workspace dimension is 320X460 suppose you want to add a button programmatically first go into IB and place a button where you want it to be and then in the right side check the coordinates of button in show the size inspector and use those coordinates in your code this will give you a fair idea about where your button will go after you add it programmatically... hope this will help you
NO. Use your imagination. Programmatically added visual objects cannot be seen in IB.
Instead, you could place an object in IB, adjust it's position to the desired one, read it's frame, delete it from IB, and use it's frame values to programmatically add id.
i have to set some objects like UILabel and UIImageView in my scroll view from Interface Builder. But, how can i do?? I know that this can be done from code, but for a multilanguage app is too annoying :)
EDIT:
I solve the problem!
I explain again and better the problem : i had to "draw" my view with UIScrollView with Interface Builder because is the easiest way to manage multilanguage view. First, we have to add UIScrollView in our view. But in this case we don't be able to insert objects in a point that have height > 460. So, i've added a scroll view, but not in my view and i've modified its height and i now add objects everywhere i want.
Try to be more specific. What problems did you encounter? Generally all you need to do is to drag&drop your outlets in the scroll view (and optionally bind them to IBOutlet fields you may have in your controller class, according to what you need to do).
I solved the problem! I explain again and better the problem : i had to "draw" my view with UIScrollView with Interface Builder because is the easiest way to manage multilanguage view. First, we have to add UIScrollView in our view. But in this case we don't be able to insert objects in a point that have height > 460. So, i've added a scroll view, but not in my view and i've modified its height and i now add objects everywhere i want.
Is it possible to design NSTableView cells using Interface Builder?
I know this is actually possible if your project is for iOS but somehow IB does not render the cell container if its for Mac OS X.
Im not sure if Amy gave that answer when this couldn't be done before, but this can be done quite easily on interface builder.
It can be done using view-based table view cells (instead of cell based) shown in the apple docs. There's is even a decent example you can download from the reference site.
No. The reason it's possible on iOS is because UITableViewCells inherit from UIView. Interface Builder lets you lay out views by putting other views within them.
On the desktop, for performance reasons from back when NextStep ran on 16mhz computers, NSCell does not inherit from NSView. A cell, on the Mac, does not have its own coordinate system or subview hierarchy, so it doesn't make sense to edit it in Interface Builder: you couldn't put other views within it!
So to make a custom cell, you need to draw everything with drawing functions such as CoreGraphics. You can't just drop in an NSImageView, you have to draw the image directly.