How to sync localized storyboards’ strings after modifying storyboard in Xcode 5

Check out ReMafoX, it’s a Mac app that perfectly solves your problem. It can be easily installed and integrated within your project, watch this video for a detailed walkthrough. Alternatively, if you prefer an open-source CLI tool without a GUI, you can also use BartyCrouch. Install BartyCrouch via Homebrew: brew install bartycrouch Alternatively, install it … Read more

Springs in Auto Layout: Distribute views evenly, with constraints, in Xcode 5

EDIT Note that in iOS 9 this technique will become unnecessary, because a UIStackView will perform distribution automatically. I’ll add another answer explaining how that works. How to Perform Even Distribution Using Autolayout The simplest way to do this in Interface Builder alone (rather than constructing constraints in code) is to use “spacer” views: Position … Read more

Design UITableView’s section header in Interface Builder

#Storyboard or XIB. Updated for 2020. Same Storyboard: return tableView.dequeueReusableCell(withIdentifier: “header”) Separate XIB (Additional step: you must register that Nib first): tableView.register(UINib(nibName: “XIBSectionHeader”, bundle:nil), forCellReuseIdentifier: “xibheader”) To load from a Storyboard instead of a XIB, see this Stack Overflow answer. #Using UITableViewCell to create Section Header in IB Take advantage of the fact that a … Read more

What’s the difference between frame and layout in Interface builder’s size inspector?

When lining controls up and measuring their distances from each other it’s often desirable to think about the controls’ locations in terms of the visual space they occupy on the screen, rather than simply their raw frames. In many cases, the visual rectangle a control occupies, and its frame are vastly different. For example, a … Read more

Anyone find that UIDatePicker is broken under iOS 14?

To add some additional information to Oscar’s answer… UIDatePicker now has three different styles, as per documentation here and here. The date picker’s style is accessible by the .preferredDatePickerStyle property which can be set to four different cases: .automatic – A style indicating that the system picks the concrete style based on the current platform … Read more

UIButton with IB_DESIGNABLE throws runtime attribute warning and does not render in Interface Builder

I have been working extensively with Live Views since it’s introductions and like a lot of new features in Xcode initially, it has some flaws. Still I like it a lot and I hope that it will be improved in newer versions. Cause: Live Views work with @property properties that get a special IB_Designable tag … Read more

UITextView with hyperlink text

Set isEditable = false or the text view will go into text-editing mode when user taps on it. Swift 4 and later let attributedString = NSMutableAttributedString(string: “Just click here to register”) let url = URL(string: “https://www.apple.com”)! // Set the ‘click here’ substring to be the link attributedString.setAttributes([.link: url], range: NSMakeRange(5, 10)) self.textView.attributedText = attributedString self.textView.isUserInteractionEnabled … Read more

How to implement Visual Effect Views in Interface Builder?

Finally figured it out. In a UIViewController change the view’s background to blue Drag a Visual Effect Views with Blur and Vibrancy object into the view, so it’s added as a subview In the first Visual Effect View, set up Auto Layout constraints to its containing View: Leading, Trailing, Top, and Bottom (to make the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)