Permalink
Commits on Apr 21, 2017
  1. fix multiline label sizing when numberOfLines == 1 (#668)

    * fix multiline label sizing when numberOfLines == 1
    
    if numberOfLines ==1, and if the text contains '\n' chars (e.g. @"multiline_start\n\n\n\nmultiline_end"), then the code was returning a size that would fit all the lines. 
    
    the original code's intent was that, if numberOfLines == 1, then -[label sizeToFit] should extend the current width (common use-case) in a single-line, so he made the constraintSize.width unbounded (source: TTTAttributedLabel/TTTAttributedLabel#28).
    
    however, he missed the case where the string itself might contain newline characters; and since he has set constraintSize.height unbounded as well, the size being returned was accounting for all lines in the string despite numberOfLines == 1.
    
    * Add runtime flag to disable the fix by default to support existing clients that may depend on the existing size calculation behavior.
    
    * Add runtime flag to disable the fix by default to support existing clients that may depend on the existing size calculation behavior.
    
    * change BOOL true/false to YES/NO
    jisungna committed with Apr 21, 2017
Commits on Mar 28, 2017
Commits on Oct 12, 2016
  1. PagingScrollView: expose RTL property and use transforms to honor it. (

    …#661)
    
    PagingScrollView: expose RTL property and use transforms to honor it.
    marcobgoogle committed with stephanemoore Oct 12, 2016
Commits on Aug 31, 2016
  1. Merge pull request #658 from stephanemoore/mcvm-bug

    Fix NIMutableCollectionViewModel
    stephanemoore committed on GitHub Aug 31, 2016
Commits on Aug 30, 2016
  1. [collections] Add a unit test target for NimbusCollections and a shar…

    …ed xcscheme for NimbusCollections.
    
    The unit test target is bootstrapped with a single test of
    NIMutableCollectionViewModel. This test should capture the error
    addressed in PR/651 as well as the error created by the changes in PR/651.
    stephanemoore committed Aug 30, 2016
  2. [collections] Fix -[NIMutableCollectionViewModel

    initWithListArray:delegate:] to construct a mutable backing store for
    rows.
    stephanemoore committed Aug 30, 2016
  3. Revert "[models] Return a mutable copy of the rows object."

    This reverts commit f10856e.
    
    The above commit causes regressions since mutations no longer occur on
    the rows property as new mutable copies are created per invocation of
    the mutableRows method.
    stephanemoore committed Aug 30, 2016
  4. Merge pull request #657 from bgeorgescu/patch-1

    Fix NIAttributedLabel race condition relating to deferred auto link detection
    stephanemoore committed on GitHub Aug 30, 2016
  5. Update NIAttributedLabel.m

    bgeorgescu committed on GitHub Aug 30, 2016
Commits on Aug 24, 2016
  1. Fix NIAttributedLabel race condition relating to deferred auto link d…

    …etection
    
    Fix two race condition issues in NIAttributedLabel relating to deferred auto link detection:
    1) If the label's string is rapidly changed (such as when scrolling and reusing cells), it is possible for the link detection results for a previous string to be applied to a newer, causing out of range errors and resulting in crashes.
    2) In the same circumstances as 1), even if we don't crash, the second string is prevented from having its links detected since the detection for the previous string hasn't finished and detectingLinks is still YES.
    bgeorgescu committed on GitHub Aug 24, 2016
  2. Fix some crashes. (#656)

    * Fix image height calculations.
    
    Replacement characters used for images need to have the same font as its neighboring text.
    
    * clamp index so it doesn't crash attributedAtIndex
    
    * Fix some crashes.
    
    attributesAtIndex:effectiveRange: can crash if index is out of bounds, this can happen if somehow we're inserting images into a 0 length string.
    addAttribute:value:range: can crash if value is nil
    bogardon committed with Aug 24, 2016
Commits on Aug 16, 2016
  1. Fix image height calculations. (#655)

    Replacement characters used for images need to have the same font as its neighboring text.
    bogardon committed with Aug 16, 2016
Commits on Jun 3, 2016
  1. Update NIMutableCollectionViewModel+Private.h (#650)

    this file is supposed to include `#import "NICollectionViewModel+Private.h"` , otherwise other files included this file will have to `#import "NICollectionViewModel+Private.h"`
    aelam committed with Jun 3, 2016
  2. [models] Return a mutable copy of the rows object.

    if create NIMutableCollectionViewModel using NSArray, then when i attach a array to this model, there will be an error
    Serlight committed with Jun 3, 2016
Commits on Apr 7, 2016
  1. Merge pull request #648 from stephanemoore/schmerps

    [attributedlabel] Fix minor error regarding UIActionSheet deprecation.
    committed Apr 7, 2016
Commits on Apr 6, 2016
  1. Merge pull request #646 from jverkoey/fixes-for-dt9

    [attributedlabel] Address various deprecation warnings
    committed Apr 6, 2016
Commits on Apr 5, 2016
  1. [attributedlabel] Suppress UIActionSheet deprecation warnings.

    This change suppresses UIActionSheet deprecation warnings while we evaluate the proper alternative for clients to use.
    stephanemoore committed Apr 5, 2016
  2. [attributedlabel] Deprecate -attributedLabel:shouldPresentActionSheet…

    …:withTextCheckingResult:atPoint:
    
    Deprecate -attributedLabel:shouldPresentActionSheet:withTextCheckingResult:atPoint: on NIAttributedLabelDelegate starting at the iOS 8.3 SDK to match UIKit's UIActionSheet deprecation. An evaluation of alternatives will be a necessary followup.
    stephanemoore committed Apr 5, 2016
  3. [attributedlabel] Address deprecations in the NSURLUtilities category.

    Update NIAttributedLabel to use NIStringByAddingPercentEscapesForURLParameterString instead of -[NSString stringByAddingPercentEscapesUsingEncoding:].
    stephanemoore committed Apr 5, 2016
  4. [attributedlabel] Address CoreText deprecations.

    Migrate from deprecated CTTextAlignment enum values. The replacement enum values are declared as being introduced in iOS 6 SDK so presumably all the iOS SDKs that Nimbus supports should have access to them.
    stephanemoore committed Apr 5, 2016
Commits on Mar 29, 2016
  1. Merge pull request #644 from jverkoey/revert-642-master

    Revert "Fix NIAttributedLabel bug: using autolayout with attributedText, the super's intrinsicContentSize is zero"
    committed Mar 29, 2016
  2. Revert "Fix NIAttributedLabel bug: using autolayout with attributedTe…

    …xt, the super's intrinsicContentSize is zero"
    committed Mar 29, 2016
  3. Merge pull request #642 from lestathc/master

    Fix NIAttributedLabel bug: using autolayout with attributedText, the super's intrinsicContentSize is zero
    committed Mar 29, 2016
Commits on Mar 24, 2016
  1. Fix NIAttributedBug: using autolayout with attributedText, the super'…

    …s intrinsicContentSize is zero and the result is wrong.
    Cong Hui(lestathc@google.com) committed Mar 24, 2016
Commits on Mar 15, 2016
  1. Merge pull request #640 from jverkoey/implicit-conversions

    [attributedlabel] Fix implicit floating point conversions
    stephanemoore committed Mar 15, 2016
  2. [attributedlabel] Fix implicit floating point conversions in NIAttrib…

    …utedLabel.m
    stephanemoore committed Mar 15, 2016
  3. Merge pull request #639 from dcouturier/master

    Added support for Strikethrough on the attributed label.
    stephanemoore committed Mar 15, 2016
Commits on Jan 10, 2016
  1. Merge pull request #636 from compositeprimes/master

    Fix an issue that can happen if we try to load pages when no data source has been set
    committed Jan 10, 2016
Commits on Jan 4, 2016
  1. Fix an issue that can happen if we try to load pages when no data sou…

    …rce has been set (which can happen when we load offscreen pages, because the call is asynchronous, dataSource can be set to nil before it gets called).
    Joe Turner committed Jan 4, 2016