IconLabel alternatives and similar libraries
Based on the "Label" category.
Alternatively, view IconLabel alternatives based on common mentions on social networks and blogs.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of IconLabel or a related project?
UILabel with possibility to place small icon on the left or on the right side. Take a look at preview image or build sample app to see how it works.
This repo has an example project, but if you want to include SMIconLabel you need only one file SMIconLabel.swift.
Alternatively you can use CocoaPods to install:
Usage is as simple as possible. Here is an Swift 2.0 example:
let labelLeft = SMIconLabel(frame: CGRect(x: 10, y: 10, width: view.frame.size.width - 20, height: 20)) labelLeft.text = "Icon on the left, text on the left" // Here is the magic labelLeft.icon = UIImage(named: "Bell") // Set icon image labelLeft.iconPadding = 5 // Set padding between icon and label labelLeft.numberOfLines = 0 // Required labelLeft.iconPosition = (.left, .top) // Icon position view.addSubview(labelLeft)
Icon position should be customized via
iconPosition property. It's defined next way:
typealias SMIconLabel.Position = (horizontal: SMIconLabel.HorizontalPosition, vertical: SMIconLabel.VerticalPosition)
In this case if you want to make icon to be placed in top-left do:
labelLeft.iconPosition = (.left, .top)
*Note that all licence references and agreements mentioned in the IconLabel README section above are relevant to that project's source code only.