The borders...
- are always 1px wide, on retina and non-retina devices.
- are pixel aligned and not blurry (except maybe on the downsampled Plus phones)
- can be activated separately on each side.
- can be jointly and independently configured
- more specific properties override more general settings.
- see header for a list of available properties
All properties can be edited in Interface Builder.
While LDOHairlineBorderView
uses IBInspectable
, it does not support IB_DESIGNABLE
, because it seems that Interface Builder still struggles rendering those views properly.
Apparently even many IBInspectable
properties can cause Interface Builder performance issues. To mitigate such problems, there's also LDOHairlineBorderViewLite
with only the minimum of inspectable properties. Try to use it whenever possible, if Interface Builder starts slogging.
To run the example project, clone the repo, and run pod install
from the Example directory first.
LDOHairlineBorderView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'LDOHairlineBorderView'
Raschke & Ludwig GbR, https://www.lurado.com/
LDOHairlineBorderView is available under the MIT license. See the LICENSE file for more information.