Menu
  • HOME
  • TAGS

Align two labels in a table cell?

ios,interface-builder,xib

Embed the labels in a new view, then centre that view with autolayout. Also, let this new view resize itself according to the labels So: - Add leading and trailing constraints between labels and their superview (new view) - Centre the new view in the UITableViewCell I just got home,...

Is it possible to run XCode Autolayout's constraint solver on command line?

xcode,interface-builder,autolayout

Yes, using the ibtool command: ibtool /path/to/your.xib --write /path/to/new.xib --update-frames ...

Create a uiview xib and reuse in storyboard

xcode,uiview,autolayout,interface-builder,xib

Works in Xcode 6.3.1 Create a new UIView named 'ReuseableView' File > New > File > Source > Cocoa Touch Class > UIView Create a matching xib file named 'ReuseableView' File > New > File > User Interface > View Set the file owner of the of the xib select...

XCode (Interface Builder): Update Frames & Constraints?

ios,xcode,xcode6,interface-builder

I'll try to explain the concept of constraints and storyboard representation. Constraints - are used to determine the position of UIView elements inside your view. For example, the vertical distance from top of the view to UIView element top. When you add constraint using the storyboard it plays 2 roles:...

SelectedRow of NSOutlineView always returns -1

cocoa,interface-builder,nstableview,selecteditem,nsoutlineview

Instead of checking the selectedRow of self object, which is just a object initialized in AppController which is a wrong instance. You need to check on the notification object as shown below. NSLog(@"Selected Row:%ld",[[notification object] selectedRow]); Also clickedRow is meaningful in the target’s implementation of the action. So the clickedRow...

DAE file specified in attribute inspector is not loaded by UIViewController

swift,xcode6,interface-builder,scenekit

I did some extensive testing, and I believe this is a bug. The IB property all work, besides the scene one. If you remove all the code in GameViewController.swift you will see the background is red, as you defined it in IB. I created a bunch of new projects, in...

What is the purpose of the Custom Formatter on Interface builder?

ios,iphone,cocoa,interface-builder,nsformatter

The NSFormatter class is an abstract class, so you need to subclass it. On that you need to implement the following methods. - (BOOL)isPartialStringValid:(NSString *)partialString newEditingString:(NSString **)newString errorDescription:(NSString **)error; - (NSString *)stringForObjectValue:(id)obj; - (BOOL)getObjectValue:(out id *)obj forString:(NSString *)string errorDescription:(out NSString **)error; Create a subclass like: .h @interface MyFormatter : NSFormatter...

Add a custom color palette to XCode Interface Builder

ios,xcode,interface-builder

Yes, you can create and edit a palette in IB and then share it with your team This article has all the details: http://natashatherobot.com/xcode-color-palette/

IBCollectionOutlet Array of Buttons with Autolayout

ios,arrays,swift,interface-builder

So, you want to autolayout programatic buttons. First question is... are you getting these to lay out at all? Are they appearing in the view in any shape or form? If not, then your issue not an autolayout one, but rather, just an issue of adding them to the view...

Disable separator for a single cell

ios,interface-builder

One easy way to get the same effect, but not answering exactly your question, is to disable UITableView's separators and adding a 1px-height UIView to the prototype cells you want to have it.

UIBarButtonItem in navigation bar is highlighted when selected but UIBarButtonItem in toolbar is not

ios,uitableview,swift,interface-builder,uibarbuttonitem

You simply misconfigured the UIbarButtonItem/UIButton in Interface Builder's Attributes Inspector. There is no point to waste time investigating such a trivial issue, no matter how puzzling it may seem. Just delete that Start button and drop a new one into the toolbar again. There is no reason for it to...

Can't change Constraint IBOutlet that is defined for different size classes in IB

ios,autolayout,interface-builder,nslayoutconstraint,size-classes

The problem is that constraints are not fully defined yet until Layout events happen between -viewWillLayoutSubviews and -viewDidLayoutSubviews where all the parameters from IB comes into play. My rule of thumb is: if you use frames to position your views manually you can do it as early as -viewDidLoad, if...

IB_designable externally

ios8,interface-builder,ibdesignable

I will answer my own question so that other people may benefit. You can use User Defined Runtime Attributes to call a category method to set your IB_Designable object from the outside. IB_DESIGNABLE @interface DesignableLabel : UILabel @end @implementation DesignableLabel @end @implementation DesignableLabel (Runtime_TheTextYouWant) - (void)setTheText:(BOOL)b { if (!b) return;...

How do I access the instance of an object that was loaded via storyboard?

ios,objective-c,xcode,interface-builder

You can create a property on your View Controller class and wire it up by control + clicking on the cube. So in your header file, create something like: @property (weak) IBOutlet MyObjectClass *myObject; ...

Custom NSView in NSTableView not showing all subviews

osx,swift,interface-builder,nstableview,nsview

I think TableCategoryView is your new class and it is subclassed from NSView and shall replace the NSTableCellView you get when creating (in IB) a view based NSTableView. If you really want to create your own TableCellView it should be a direct subclass of NSTableCellView not NSView. But in your...

UITableView with dynamic prototypes content and multi sections

ios,uitableview,swift,interface-builder

Couldn't find a way to do it inside the interface builder but I have solved it by choosing the "dynamic prototypes" for the UITableView content and then in the UITableViewController added this: override func numberOfSectionsInTableView(tableView: UITableView) -> Int { return N // number of required sections } Now I can...

Custom UIView as navigationItem title

ios,uiview,interface-builder,xib,uinavigationitem

In your custom view, override the layoutSubviews method and add this: CGSize targetSize = [self systemLayoutSizeFittingSize:UILayoutFittingCompressedSize]; Create a CGRectFrame from this and set this frame as a new frame for self (which is the custom view). This will basically find the smallest possible frame that still encompasses its content in...

UICollectionView flickers thin “see through” lines between cells when scrolling

ios,objective-c,interface-builder

EDIT* - This is actually caused by the app's deployment target being set as iOS7. When I switch to ios8, the problem goes away. Sounds like you need to update your app to properly support iPhone 6/6+ screen sizes. One of my apps has this problem. You'll need to go...

WKInterfaceLabel won't scroll when it is inside a group

swift,interface-builder,watchkit,wkinterfacelabel

Set your Group to fit content. Your Group is hiding you label display.

How to set the default writing direction for NSTextView?

osx,swift,cocoa,interface-builder,nstextview

NSTextView inherits from NSText. NSText has a baseWritingDirection property. Try setting that: hebrewTextView.baseWritingDirection = NSWritingDirection.RightToLeft It also inherits the action method makeBaseWritingDirectionRightToLeft() from NSResponder, which presumably what the contextual menu uses. So, you could call that. If neither of those works, you can set the text view's defaultParagraphStyle to one...

Seperation between navigation bar and table view disappear

ios,uitableview,interface-builder,uinavigationbar,uistoryboard

You have to choose your first view controller and from top menu you must select Editor -> Embed In -> Navigation Controller This is how you add Navigation Controller to a View Controller. Also you have to use delegation for passing data back from the pushed view controller. ...

iOS UIButton title keeps reverting in UITableViewCell

ios,uitableview,uibutton,interface-builder,uistoryboard

From the apple docs of titleLabel Do not use the label object to set the text color or the shadow color. Instead, use the setTitleColor:forState: and setTitleShadowColor:forState: methods of this class to make those changes. Similarly for text you should use setTitle:forState: [sender.titleLabel setTitle:@"Clicked" forState:UIControlStateNormal]; ...

Root child view not sized properly when displayed by navigation controller

ios,xcode,uiview,uinavigationcontroller,interface-builder

To solve this issue, I used the view debugger to capture the view hierarchy of both another navigation push segue that was working properly and this one. This showed me that the black rectangle area was reserved for showing a UIToolbar. Since you can't hide or show toolbars currently using...

iOS -custom xib file not appearing as inputAccessoryView of UITextField

ios,iphone,xcode,uiview,interface-builder

You have not add subview when you call init,and you forget to set frame of your view in xib. so you may change your code to this and try. #import "CostcoLoginView.h" @implementation CostcoLoginView -(id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if(self){ [self setup]; } return self; } -(id)initWithCoder:(NSCoder *)aDecoder{ self=[super initWithCoder:aDecoder]; if(self){...

Can NSDatePicker have a contextual menu?

cocoa,interface-builder,nsdatepicker

On OS X 10.9.5, class-dump shows that NSDatePicker overrides -rightMouseDown: (as well as -rightMouseDragged: and -rightMouseUp:). I'm guessing it doesn't call through to super and so is (accidentally?) blocking the contextual menu. First, does right-dragging in a date picker do something unique? I've not been able to see it, but...

Make view loaded from nib respect superview's top layout guide (Navigation Bar Bottom)

ios,swift,interface-builder,autolayout,uinavigationbar

Try one of the following: Use self.edgesForExtendedLayout = UIRectEdgeNone; in your view controller's -viewDidLoad method. This will translate the origin.y to the bottom of the nav bar. Add a constraint in your view controller that makes the LocationPermissionsInfoView's view to respect it's topLayoutGuide. Since you are adding the view programmatically,...

NSSplitViewItem does not display like it designed in IB

objective-c,xcode,cocoa,interface-builder,nssplitview

Try connecting the view outlet of the NSSplitViewController to the NSSplitView - this worked for me in a simple sample project. If no-one comes along with a better answer, I'd consider filing this behaviour as a bug using Apple's Bug Reporter - either this connection should be configured by default,...

Difference between Frame Rectangle and Alignment Rectangle

xcode,interface-builder,xcode6

Frames describe where to place views on the screen and how big those views will be. When laying out views, constraints use a related geometric element called an alignment rectangle. The alignment rectangle is based on the presentation of the item’s content, Auto Layout uses the alignment rectangle instead of...

iOS 8 Autolayout - Dynamically Resizing 4 Square Views

ios,interface-builder,autolayout

Select all of the squares and apply Equal Widths and Equal Heights constraints to them all. Then, for one of the squares, apply an Aspect Ratio constraint to keep its width and height equal to each other. Finally, add a single space constraint between any two adjacent squares. Those along...

xcode 6.1.1 new class naming sctructure

xcode,interface-builder

As of Xcode 6, Apple has distinguished classes from other kinds of file. You want to go command+n -> Cocoa Touch Class and follow through there. Unintuitively, Apple does not offer the ability to create an Objective-C class within the 'Objective-C File' template.

UIContainerView height of content (embedded UITableViewController)

ios,swift,interface-builder,autolayout

Programmatic intervention is required: UITableViews are of course UIScrollViews, and nested scrollviews aren't going to be able to size themselves in AutoLayout. It's a legitimate ambiguity, because AutoLayout won't know to make the frame smaller and require more scrolling or the frame bigger and less scrolling. In your case, you...

Custom system font for a UIBarButtonItem in a toolbar for LaunchScreen.xib

ios,fonts,interface-builder

You can use UIBarButtonItem with a custom view. You can do that in a storyboard/xib just by dragging and dropping a view/button to your toolbar and it will create a UIBarButtonItem with the nested view. The code will look like this: <barButtonItem style="plain" id="AwC-sg-sT1"> <view key="customView" contentMode="scaleToFill" id="4Z4-cp-rPM"> <rect key="frame"...

How do I customize NSOutlineView to have border color?

objective-c,osx,cocoa,interface-builder,nsoutlineview

Step 1: Create an NSTableViewRow subclass The borders are drawn on the NSTableRowView instances that make up the table's rows. To get them, you could subclass NSTableRowView and give it a borders property that stores a mask specifying which borders you want drawn on the row. You'd accompany this with...

UITableViewCell background colour different then what I inputted

ios,xcode,uitableview,ipad,interface-builder

for iPad write down your code i.e. UIView *customColorView = [[UIView alloc] init]; customColorView.backgroundColor = [UIColor colorWithRed:0.15 green:0.40 blue:0.60 alpha:1.0]; cell.selectedBackgroundView = customColorView; in willDisplayCell delegate. I think This will helps you....

Is it possible to align 3 Views side by side with same width in auto layout by only using interfacebuilder?

ios,xcode6,interface-builder,autolayout

set the three views to have an equal width set view1's leading constraint to superview to have a constant of 0 set view1's trailing constraint to view2 to have a constant of 0 set view2's trailing constraint to view3 to have a constant of 0 set view3's trailing constraint...

How to show subclass of UIControl in View Controller

ios,swift,interface-builder,iboutlet,uicontrol

Off-course you can't add IBOutlet because buttons what you added to WeekdayControl are in UIViewController, you can't add Outlet to WeekdayControl, buttons only subviews of WeekdayControl, UIViewController is boss here, and you can add outlet only to UIViewController. (Sorry for my English) Better create you buttons programatically in WeekdayControl....

How to dismiss an OS X modal sheet with *either* ENTER or ESC key

osx,cocoa,interface-builder

See -[NSResponder cancelOperation:], which is automatically bound to the escape key: This method is bound to the Escape and Command-. (period) keys. The key window first searches the view hierarchy for a view whose key equivalent is Escape or Command-., whichever was entered. If none of these views handles the...

UITableViewCell Can Not Constrain Label to Right Edge

ios,swift,uitableview,autolayout,interface-builder

First of all remove all constraint from that three label then follow this step and add constraint one by one as mentioned below. For Left Label select your label go to pin menu the add this 5 constraint for it.: For center label add this two constraint so it will...

Multiple Choice App Feature

ios,ios8,interface-builder,nslayoutconstraint

One option is to make the answers live in a UITableView and then each answer is just a cell and you can do it all in Interface Builder. A second option, if you know you'll never have more than 8 answers, is to put all eight UILabels and set unused...

Interface Builder doesn't show objects

ios,iphone,interface-builder,xcode6

This happens when you set "size classes" incorrectly. For example, when you design a controller with a specific size class set and then you change the class to a different one.

Why are certain unicode characters not showing in Interface Builder?

ios,unicode,interface-builder

None of the fonts that are provided with iOS include a glyph for that character. If you visit this test page in MobileSafari, you will also see it rendered as a fallback square. In order to have this character rendered correctly, you will need to supply a font with your...

Interface Builder is not letting me delete a button

ios,xcode,interface-builder,uistoryboard

Clean the project and delete the app on simulator.

Suddenly xcode hided the views in interface builder Storyboard - iphone

ios,interface-builder,xcode-storyboard

You are looking at what happens when you have designed your views in a particular size class and then, when you look at the storyboard, you are not in that size class. For example, let's say you happened to be in size class H:Regular W:Compact when you put "top line"...

Resize views relative to each other Xcode 6

ios,xcode,storyboard,autolayout,interface-builder

As the view at the bottom has a fixed height...you just need to pin all edges of the all views and just need to give equal width constraints to the black and green views...just like below image... And the output in different screens... ...

Subview content being mysteriously offset in Interface Builder?

xcode,interface-builder,uicollectionview,uitextview,offset

The answer turned out to be turning off "Adjust Scroll View Insets" on the ViewController. Sort of a weird behavior for the ViewController to present like that, adjusting a single ScrollView without any regard for its position or size, but at least it was an easy fix. ...

Import swift class into objective c storyboard

ios,objective-c,swift,storyboard,interface-builder

Figured it out! You just need to edit the MODULE in the interface builder to the name of the project!!...

How to reproduce this “offset behavior” programmatically?

ios,uikit,interface-builder

For UIScrollView and its subclasses (UICollectionView, UITableView), setting the contentInset to something like, say, UIEdgeInsetsMake(64.0 /* TOP */, 0.0 /* LEFT */, 44.0 /* BOTTOM */, 0.0 /* RIGHT */); would be the way to go. You can inspect the UIViewController's properties topLayoutGuide and bottomLayoutGuide to determine how much you...

Does UIScrollview works correct with UIStatusbar?

ios,objective-c,uiscrollview,interface-builder,uistatusbar

From Documentation A Boolean value that indicates whether the view controller should automatically adjust its scroll view insets. Declaration @property(nonatomic, assign) BOOL automaticallyAdjustsScrollViewInsets Discussion Default value is YES, which allows the view controller to adjust its scroll view insets in response to the screen areas consumed by the status bar,...

How to configure a navigation controller in interface builder?

ios,swift,interface-builder

If you want to show different different view controller on each different cell in tableView in ur case ie. category. Add view controllers in Your story board. Add add segue to each controller from table view. not from cell. set identifier to each segue . After this u can call...

Connecting cell selection to presenting segue (show) - swift

ios,swift,interface-builder,uicollectionview

Answered in comments. Calling self.performSegueWithIdentifier("yourSegueIdentifer", sender: self) fixed it.

Reference main NSWindow in AppDelegate using Storyboard?

xcode,swift,cocoa,interface-builder

I dont know if this is correct way of doing, but this will solve your problem. Decalre a NSWindow property in AppDelegate weak var window: NSWindow! and set the property in something like windowWillLoad of the NSWindowController (NSApplication.sharedApplication().delegate as! AppDelegate).window = self.window You will have to subclass NSWindowController to define...

What is the new way of binding an NSArrayController to the managed object context of a Core Data document?

xcode,core-data,interface-builder,cocoa-bindings

So I have the answer from Apple. This is for Document based Core Data apps, the code is all in Swift but the idea is the same in Objective-C you just have to translate it. The first answer they gave me was to bind the array controller to the view...

iOS Table View XIB layout issue

ios,xcode,uitableview,interface-builder,xib

ok, i got it. override the init method like the following: - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { self.automaticallyAdjustsScrollViewInsets = NO; } return self; } you have to take care of the insets yourself since this automatic property can only handle the inset...

Launch Screen XIB: Missing Width / Height Constraints

ios,xcode,interface-builder,autolayout

I haven't been able to find an official explanation as to why XIBs behave like that, when they have a UIView at the root. What looks weird to me is that what we are provided with as a default (LaunchScreen.xib) isn't set up to behave exactly like the Storyboards we've...

Setting constraints in a UITableView cell, keeping UIButtons appropriately spaced

ios,xcode,uitableview,interface-builder

You can add some transparent views to the superview, and use them as spacers. I thought this was weird at first, but I noticed that Apple recommends it (it even turns up as a suggestion in one of their amazingly informative NSLayout debug messages) [self.view addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @"H:|[spacer1][view1]\ [spacer2(==spacer1)][view2]\...

Assigning Property to Loaded .xib

ios,cocoa-touch,interface-builder,xib

CustomToolBar *toolBar = (CustomToolBar *)[[[[NSBundle mainBundle] loadNibNamed:@"CoolBar" owner:self options:nil] objectAtIndex:0] initWithFrame:CGRectMake( 0, self.view.frame.size.height, self.view.frame.size.width, 70)]; Your code makes no sense. You cannot / must not init an object loaded from a nib; it has already been initialized. I suggest you take that statement apart into several steps and make sure...

Creating a 3x3 grid with auto layout constraints

ios,xcode,interface-builder,autolayout

There are a number of ways you could create this layout with constraints. Here's one. First, a tip: you can name your views in the document outline. This makes it much easier to understand which views are which and what your constraints are connected to. To name a view, click...

GooglePlus Sign In issue

ios8,xcode6,interface-builder,google-plus-signin

The problem was that it was giving the issue of duplicate files, that were present in Bolts.framework and FacebookSDK.framework both. After that I found out that FacebookSDK.framework was not needed there and so I removed it and the app started working perfectly.

Sibling object not available in menu when setting Auto Layout constraint in Storyboard

ios,xcode,storyboard,autolayout,interface-builder

The views only show up that make sense for the direction you chose. So, if one view is above another, and you choose the left or right constraint, the other view does't show up. If you choose the top constraint, it should. Another way to do this is to control-drag...

How to make a view with picker and toolbar stay at the bottom of iphone screen

ios,xcode6,interface-builder

yearView.frame = CGRect(x: 0, y: height - 250, width: self.view.frame.width, height: 250) Try moving it out of the ViewDidLoad, you need to position that view whenever you unhide it, otherwise it will not show. ...

How to make a window not open when the app loads XCode

cocoa,interface-builder,nswindow

In the IB , you can find a check box named "Visible at Launch" in attributes tab. You can uncheck that.So that window will not launch on app loading time

Why my `IBAction` linked to another Project’s main.storyboard's view

ios,interface-builder

Just delete that connection by renaming the -(IBAction)XXX to -(IBAction)YYY & replace the name to YYY from where you are calling it in selector. And hope it will solve your issue. Happy Coding...

Autolayout Programatic Sizing Woes: Cannot Resize Superview

cocoa,swift,interface-builder,autolayout

Because you aren't adding any constraints to your box in Interface Builder, at the point it loads it is considered to have an ambiguous layout. To remove this ambiguity, Cocoa automatically adds some constraints: override func viewDidLoad() { super.viewDidLoad() println(view.constraints) //-> <NSIBPrototypingLayoutConstraint:0x600000082e40 'IB auto generated at build time for view...

Enabling/Disabling NSLayoutConstraints in InterfaceBuilder

ios,objective-c,xcode,interface-builder,autolayout

Select the constraint you want to disable in storyboard, and Option+Command+4 to show Attributes Inspector, then unselect Installed.

Xcode 7 beta made my apps storyboard files inaccessible

interface-builder,xib,xcode7

I fixed this by reinstalling Xcode 6 and unfortunately by changing Swift 2 elements back to Swift 1, I didn't back up. Then I deleted every Nib or Xib file in the project, but I did copy them separately in an other map. I could open these files, and copy...

Can't set custom class for cell in table view controller

ios,uitableview,swift,storyboard,interface-builder

--> incredibly after a complete reboot of my Mac now everything works and I can set my custom class. Really strange but I decide to reply to my post, maybe can be helpful for someone else....

Two scenes sharing a different scene wont segue

swift,ios8,storyboard,interface-builder,scene

The only way I got around this was to use two Done buttons on the date picker scene because one button cant have two unwind methods. So when i segue from one scene to date picker scene I send a boolean in prepare for segue. In date picker scene I...

UIButton border disappears

ios,uikit,interface-builder

You can not set some properties of a view's layer through interface builder. You can set a layer's borderWidth and cornerRadius via Interface Builder tool of Xcode, but you will not be able to set borderColor using Interface Builder and it's probably because the layer.borderColor wants a CGColor instead of...

How can I keep one NSButton as pressed after click on it?

xcode,cocoa,interface-builder,appkit,nsbutton

If those are really NSButtons, then open the xib in Xcode, click on the button, go to the "Attributes" pane, and change the "Type" of the button to "Push On Push Off". That makes it "sticky".

How do I subscribe to TextField's TextChanged event in Xcode

xcode,osx,swift,interface-builder

Create a class that implements the protocol NSTextFieldDelegate like class MyTextField:NSTextField, NSTextFieldDelegate { override func awakeFromNib() { delegate = self // tell that we care for ourselfs } override func controlTextDidChange(obj: NSNotification) { // .... handle change, there are a lot of other similar methods. See help } } In...

center a view between two buttons

ios,interface-builder,autolayout

Add a view between your buttons. Give it a clear background and pin it on the left and right to your buttons with a constant space of 0. Add your line view to this view and center it horizontally in its containing view. ...

SubViews disappear in Interface Builder

ios,xcode,interface-builder

You should check size class here,I think that your old project is build for a size class and you view it on another ...

How to get a button to stay on the right in a cell for all sizes?

ios,uitableview,swift,interface-builder,uistoryboard

You should add auto layout constraints. In storyboards, you can add auto layout to make the button stay on the right like this: I used a switch to demonstrate. 1) Select the "Button". 2) Click the icon on the bottom circled in red. 3) Constrain the space between the superview...

iOS - changng constraint relation programatically

ios,xcode,interface-builder,nslayoutconstraint

According to the documentation, relation is read-only. What you will need to do, I suspect, is to set self.myConstraint.active = NO; Then make a new NSLayoutConstraint programmatically using: + constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant: And in the process copying values you want to keep, and replacing the relation. Then add it to the view...

How to occupy the app bottom with an image?

ios,xcode,uiimageview,interface-builder,autolayout

You need to set an Aspect Ratio constraint for the image so that Xcode knows how large it will be

Resizing UiView Height With Dynamic Content in UIScrollView (Swift)

ios,swift,interface-builder

The scrollability (is that a word?) of a UIScrollView depends upon its contentSize in relation to its bounds size. The idea is to make the contentSize embrace the content; if it is bigger than the scroll view's bounds size, the user can scroll. Your code doesn't set the contentSize anywhere....

WatchKit Interface controller scrolls too much after adding next page segue

objective-c,storyboard,interface-builder,watchkit,apple-watch

I've struggled with the same issue for several hours until I decided to give it up for a while and focus on filling the labels with actual data at runtime. After I added some code to the main initialisation methods of WKInterfaceController ((void)awakeWithContext:(id)context {} and/or (void)willActivate {} ), this scrolling...

TableView Cell Separator Line Not Extending Across the Entire Cell

swift,interface-builder,xcode6

first set table view 1.set separatorInset of tableview instance to UIEdgeInsetsMake(0, 0, 0, 0) second set cell 1.set preservesSuperviewLayoutMargins of cell (instance) to NO 2.set layoutMargins of cell to UIEdgeInsetsZero 3.saet separatorInset of cell to UIEdgeInsetsZero Hope to help you...

IBInspectable & watchkit

ios,interface-builder,watchkit

You can't, because for WatchKit they are Interface Objects instead of Views. Apple intentionally uses different terms for them because they are fundamentally different things. Interface Objects are proxy objects to those actual views in the actual watch app (not your WatchKit Extension). They communicate through WatchKit via Bluetooth to...

UISlider setMaximumTrackTintColor doesn't work in IB

ios,interface-builder,uislider

Seems like this is a bug in interface builder. I'm using Xcode 6.3.1 and was able to reproduce this as well. Min Track Tint and Thumb Tint work, but Max Track Tint has no effect when running on device.

Align UIBarButtonItem Title to prevent overlapping of other Buttons?

ios,user-interface,interface-builder,xcode-storyboard

You can set custom title view to the navigation bar like this way. //To hide default back button self.navigationItem.hidesBackButton=YES; //Title View for Navigation UIView *navTitle1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 44)]; [navTitle1 setBackgroundColor:[UIColor lightGrayColor]]; //Left View button and separator UIButton *crossBarButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)]; [crossBarButton...

iOS Autolayout view height based on larger subview height

ios,swift,autolayout,interface-builder

Rintaro's answer was very detailed and helpful, but it wasn't working for me exactly how I wanted. It would work as far as keeping the view a certain minimum height, but it was also cutting off the label at a static height. What I ended up doing was just use...

what are key command in interface Builder

objective-c,xcode,swift,interface-builder

This is list of key commands that trigger actions on the responder. You can look to Apple documentation at UIResponder class and it's "keyCommands" property: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIResponder_Class/index.html#//apple_ref/occ/instp/UIResponder/keyCommands Or you can go through some tutorial how to use this feature, like this one: http://www.danandcheryl.com/2014/04/how-and-why-to-implement-keyboard-shortcuts-in-ios-7...

xcode 6 - red constraints

ios,xcode,xcode6,interface-builder,nslayoutconstraint

It's indicating that there is a problem with your layout. Either your views are not properly positioned, there is an unresolvable conflict between your constraints, or some properties are ambiguous because constraints are missing. If you look at the inner left pane there will be a little yellow or red...

WatchKit: Change only one Interface Controller title color

swift,interface-builder,watchkit

Unfortunately there is no way to do it programmatically at this time. So, it means that you can not change it on run time. Whatever you can do, you can find the answer on the Watch App Programming Guide. We have to admit that there are so many limitations on...

Why is the UITextField placeholder text decreasing in size?

ios,iphone,xcode,interface-builder

This is just a visual bug in Xcode 6. Whenever you copy an element with text, that text's font-size seems to visually be altered. However, when you build and run the app, it should show up normal on your device or simulator. You can fix the visual bug by clicking...

Prevent Interface Builder from auto creating Constraints?

ios,autolayout,interface-builder,nslayoutconstraint,xcode-storyboard

If you are confused about the NSAutoresizingMaskLayoutConstraints in that list, it might be because you haven't called setTranslatesAutoresizingMasksIntoContraints(false) on that view. (although, I was under the impression that SnapKit does that for you). If you are confused about the NSIBPrototypingLayoutConstraint, that's an auto-generated constraint by Interface Builder. To get rid...

Xcode/Interface Builder is ignoring the Fill Color setting

xcode,interface-builder,nsbox

From the NSBox documentation: Special Considerations Functional only when the receiver’s box type (boxType) is NSBoxCustom and its border type (borderType) is NSLineBorder. ...

Static tableview cell stays highlighted when returning from different scene

ios,swift,ios8,interface-builder

I ended up figuring it out on my own. You need to make a swift file for that UITableViewController that is embedded into the UIViewController. Then make sure your tableview is a delegate, and then call the override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { tableView.deselectRowAtIndexPath(indexPath, animated: true) } in...

Connecting next field chain for form text fields

ios,objective-c,interface-builder

Just remove all the outlets and recreate them again. You just missed or duplicated one of them, since you have several textfields it is highly possible something has gone awry. And make sure that each nextField really points to next field :) UPDATE: It's late night so I missed one...

TextCell in InerfaceBuilder for NSTableView

xcode,cocoa,interface-builder,tableview

Yes, it's strange that that's still there. It's useless and has no effect on anything, but you can't delete it. Ignore it.

Different font sizes for uibutton and uilabel for iphone/ipad

xcode,swift,fonts,interface-builder

You can always check for device type. if (UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiom.Pad) { //label font size for iPad } else { //label font size for iPhones } We have a enum to define for device type check. enum UIUserInterfaceIdiom : Int { case Unspecified case Phone // iPhone and iPod touch...

Trying to load a nib from interface builder

ios,interface-builder,xib,initwithcoder

I have tried all answers but this is the only code that worked, after several trials: - (instancetype)initWithCoder:(NSCoder *)aDecoder { self = [super initWithCoder:aDecoder]; if (self.view == nil) { NSBundle *mainBundle = [NSBundle mainBundle]; [mainBundle loadNibNamed:@"MonthDayPicker" owner:self options:nil]; [self addSubview:self.view]; return self; } return nil; } ...