Git Product home page Git Product logo

attributedlabel's Introduction

NimbusKit

NimbusKit is the iOS framework whose feature set grows only as fast as its documentation.

Getting Started

  • Clone this repository https://github.com/NimbusKit/Catalog.git.
  • cd to the Catalog directory.
  • Run the command ./refresh_features

All of NimbusKit's features will be cloned to your computer in the Catalog/features folder.

attributedlabel's People

Contributors

jverkoey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

attributedlabel's Issues

blending?

no matter what I do there will always be some kind of blending associated when I set attributed text on NIAttributedLabel. does anyone know why?

Attributed label gets truncated when using non-Latin scripts and AutoLayout

When using non-Latin scripts (such as Arabic or Chinese), NIAttributedLabel's text can be truncated when using AutoLayout to let the label size itself.

To reproduce, constrain an NIAttributedLabel instance so that it's width is specified (i.e. to the left and right of the screen), and so that its height is unspecified (i.e. only to the top of the screen). When the NIAttributedLabel's text is Arabic, the text will be truncated.

UIActionSheet is deprecated

/ProjectPath/Pods/NimbusKit-AttributedLabel/src/NIAttributedLabel.h:147:88: 'UIActionSheet' is deprecated: first deprecated in iOS 8.3 - UIActionSheet is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleActionSheet instead

build errors in Xcode 6.2

I just added the attributed label to my prject and get the following errors in Xcode 6.2:

/Users/koen/Documents/Development/Projects/attributedlabel/src/NIAttributedLabel.m:87:21: Implicit declaration of function '__tg_ceil' is invalid in C99

Any suggestions?

Strikethrough doesn't appear to be working

Strikethrough attributes don't appear to be working for NIAttributedLabel. This may be by design, not sure. I might be missing something.

Whipped up a bare bones reproduction of the issue:

#import "TestViewController.h"
#import "NIAttributedLabel.h"
@implementation TestViewController
- (void)viewDidLoad {
    UILabel *label = [[UILabel alloc] init];
    [self loadLabel:label];
    [self.view addSubview:label];
    label.frame = (CGRect){CGPointMake(0, 40), [label sizeThatFits:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)]};

    NIAttributedLabel *niLabel = [[NIAttributedLabel alloc] init];
    [self loadLabel:niLabel];
    [self.view addSubview:niLabel];
    niLabel.frame = (CGRect){CGPointMake(0, 80), [niLabel sizeThatFits:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)]};
}

- (void)loadLabel:(UILabel *)label {
    NSString *text = @"some text yo";
    NSDictionary *baseAttrs = @{
        NSFontAttributeName: [UIFont fontWithName:@"Helvetica" size:20.0f],
        NSForegroundColorAttributeName: [UIColor blackColor]
    };

    NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:text attributes:baseAttrs];
    [attrString addAttribute:NSStrikethroughStyleAttributeName
                       value:@(NSUnderlineStyleSingle)
                       range:[text rangeOfString:@"text"]];
    label.attributedText = attrString;
}
@end

Thanks! ^_^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.