changsanjiang / Sjattributesfactory
Licence: mit
Simplify operation NSAttributedString, make writing easier. Attributes String Editing Factory. iOS 富文本编辑, 让代码更清晰. 文本编辑, 高度计算, 正则匹配等待... 简便操作, 让你爽到爆!
Stars: ✭ 372
Labels
Projects that are alternatives of or similar to Sjattributesfactory
Attributedstring
基于Swift插值方式优雅的构建富文本, 支持点击长按事件, 支持不同类型过滤, 支持自定义视图等.
Stars: ✭ 294 (-20.97%)
Mutual labels: label, nsattributedstring
Cjlabel
A drop-in replacement for UILabel that supports NSAttributedString, rich text, display any view, links, select copy and more
Stars: ✭ 140 (-62.37%)
Mutual labels: label, nsattributedstring
Cupcake
An easy way to create and layout UI components for iOS (Swift version).
Stars: ✭ 273 (-26.61%)
Mutual labels: nsattributedstring
simple-image-classifier
Simple image classifier microservice using tensorflow and sanic
Stars: ✭ 22 (-94.09%)
Mutual labels: label
dependent-issues
📦 A GitHub Action for marking issues as dependent on another
Stars: ✭ 83 (-77.69%)
Mutual labels: label
action-release-label
🏷️ GitHub Action to output a semver update level from a pull request release label
Stars: ✭ 41 (-88.98%)
Mutual labels: label
Tyattributedlabel
TYAttributedLabel 简单,强大的属性文本控件(无需了解CoreText),支持图文混排显示,支持添加链接,image和UIView控件,支持自定义排版显示
Stars: ✭ 2,875 (+672.85%)
Mutual labels: label
zplgfa
#Golang package and cli tool for converting to #ZPL (from PNG, JPEG and GIF) for @ZebraTechnology-printers
Stars: ✭ 29 (-92.2%)
Mutual labels: label
CuteAttribute
An elegant way to deal with attributed string in swift.
Stars: ✭ 65 (-82.53%)
Mutual labels: nsattributedstring
Prestyler
Elegant text formatting tool in Swift 🔥
Stars: ✭ 36 (-90.32%)
Mutual labels: nsattributedstring
Form-Labeller
Use this tool to label forms, bounding boxes, and assigning types to annotations
Stars: ✭ 17 (-95.43%)
Mutual labels: label
react-native-select-multiple
☑️ A customiseable FlatList that allows you to select multiple rows
Stars: ✭ 155 (-58.33%)
Mutual labels: label
WaveLabelDemo
波浪经过文字,文字改变颜色。Waves pass through words, and words change colours.
Stars: ✭ 58 (-84.41%)
Mutual labels: label
Flowhelper
帮助您迅速构建顶部Tab,比如今日头条效果,热搜、搜索记录、与ViewPager/ViewPager2搭配的工具类;
Stars: ✭ 295 (-20.7%)
Mutual labels: label
SJAttributesFactory
Objc
pod 'SJAttributesFactory'
Swift
pod 'SJAttributesStringMaker'
use in swift:
let text = NSAttributedString.sj.makeText { (make) in
make.font(.boldSystemFont(ofSize: 20)).textColor(.black).lineSpacing(8)
make.append("Hello world!")
}
// It's equivalent to below code.
let paragraphStyle = NSParagraphStyle.default.mutableCopy() as! NSMutableParagraphStyle
paragraphStyle.lineSpacing = 8
let attributes = [NSAttributedString.Key.font:UIFont.boldSystemFont(ofSize: 20),
NSAttributedString.Key.foregroundColor:UIColor.black,
NSAttributedString.Key.paragraphStyle:paragraphStyle]
let text1 = NSAttributedString.init(string: "Hello world!", attributes: attributes)
use in Objc:
NSAttributedString *text = [NSAttributedString sj_UIKitText:^(id<SJUIKitTextMakerProtocol> _Nonnull make) {
make.font([UIFont boldSystemFontOfSize:20]).textColor(UIColor.blackColor).lineSpacing(8);
make.append(@":Image -");
make.appendImage(^(id<SJUTImageAttachment> _Nonnull make) {
make.image = [UIImage imageNamed:@"sample2"];
make.bounds = CGRectMake(0, 0, 30, 30);
});
make.append(@"\n");
make.append(@":UnderLine").underLine(^(id<SJUTDecoration> _Nonnull make) {
make.style = NSUnderlineStyleSingle;
make.color = UIColor.greenColor;
});
make.append(@"\n");
make.append(@":Strikethrough").strikethrough(^(id<SJUTDecoration> _Nonnull make) {
make.style = NSUnderlineStyleSingle;
make.color = UIColor.greenColor;
});
make.append(@"\n");
make.append(@":BackgroundColor").backgroundColor(UIColor.greenColor);
make.append(@"\n");
make.append(@":Kern").kern(6);
make.append(@"\n");
make.append(@":Shadow").shadow(^(NSShadow * _Nonnull make) {
make.shadowColor = [UIColor redColor];
make.shadowOffset = CGSizeMake(0, 1);
make.shadowBlurRadius = 5;
});
make.append(@"\n");
make.append(@":Stroke").stroke(^(id<SJUTStroke> _Nonnull make) {
make.color = [UIColor greenColor];
make.width = 1;
});
make.append(@"\n");
make.append(@"oOo").font([UIFont boldSystemFontOfSize:25]).alignment(NSTextAlignmentCenter);
make.append(@"\n");
make.append(@"Regular Expression").backgroundColor([UIColor greenColor]);
make.regex(@"Regular").update(^(id<SJUTAttributesProtocol> _Nonnull make) {
make.font([UIFont boldSystemFontOfSize:25]).textColor(UIColor.purpleColor);
});
make.regex(@"ss").replaceWithString(@"SS").backgroundColor([UIColor greenColor]);
make.regex(@"on").replaceWithText(^(id<SJUIKitTextMakerProtocol> _Nonnull make) {
make.append(@"ON😆").textColor([UIColor redColor]).backgroundColor([UIColor greenColor]).font([UIFont boldSystemFontOfSize:30]);
});
}];
Contact
- Email: [email protected]
- QQ: 1779609779
- QQGroup: 719616775
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].