I want to build a custom control to reuse in my project which consists of two UITextFields that are linked together + a label.
It is starting to become repetitive across my App and smells of code duplication ;)
However, I wonder what is the best aproach here.
Is it best do everything by code in a controller or is posible do a visual thing like the ones built-in in Xcode?
In the storyboard, open the Assistant editor; it should display ViewController. swift. To create the outlet, click the Knob and control-drag it right underneath the animateSwitch IBOutlet . Release the drag and, in the pop-up window, name the outlet knob then click Connect.
The central component of the iOS SDK is Xcode, Apple's interactive development environment (IDE). Xcode facilitates building apps for OS X, iOS and WatchOS. Xcode includes the interface, the LLVM compiler, instruments and iOS simulator tools that make development and testing possible without an Apple device.
You can build an Interface Builder plug-in for this. It's fairly straight-forward. To get started, read the Interface Builder Plug-In Programming Guide. It even has a quick, step-by-step tutorial to get you started. Apple recommends creating a plug-in to IB for just your case...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With