24 Commits

Author SHA1 Message Date
Kevin
7bb3079082 Don't add extraneous truncation token during kCTLineTruncationMiddle. (#1297)
* Don't add extraneous truncation token during kCTLineTruncationMiddle

* Expand these comments a little.
2019-03-06 10:05:30 -08:00
Adlai Holler
d0ba092a77
Convert the codebase to Objective-C++ (#1206)
* Convert the codebase to Objective-C++ throughout. One language is better than two.

* Put it back

* Fix linker

* Point explicitly to updated Weaver to unblock build

* Revert "Point explicitly to updated Weaver to unblock build"

This reverts commit fdc25296e8794d4e6e56c35f5fe6da2be3f71dbc.

* Revert "Fix linker"

This reverts commit 7be25f91519b8497ef42de79f115bcfbdb965c39.

* Add in the frameworks

* no message

* Address spec lint warnings

* Fix tvos build

* Put that back

* Address Michael's review

* Add comment to kick CI
2018-11-02 12:04:14 -07:00
Adlai Holler
0380b270bb
Address Xcode warnings about unguarded availability and implicit self retains (#1207) 2018-11-01 19:40:16 -07:00
Kevin
be021434c8 Newline character support and truncated line sizing improvement. (#1193)
* Newline character support and truncated line sizing improvement.

For purposes of truncating text, respect explicit newlines.
Don't size to smaller than truncated line width unless we have to.

* Update CHANGELOG.md
2018-10-30 13:19:23 -07:00
Kevin
6ea7f06d84 Fix shadowed var warning (and add clarity) #trivial (#1198)
* Fix shadowed var warning (and add clarity)

* Update ASTextLayout.m
2018-10-29 07:55:54 -07:00
Michael Schneider
25a3d331ee
Correct linePositionModifier behavior (#1192) 2018-10-26 07:43:22 -07:00
Kevin
bfb22988f7 [ASTextNode2] Add improved support for all line-break modes in experimental text node. (#1150)
* ASTextNode2 rendering corrections.

ASTextNode2 was only setting truncationMode (lineBreakMode) on existing paragraph styles in attributedString (thus having no effect for the two non-truncating modes if there were not any existing paragraph style runs).

ASTextLayout (essentially YYTextLayout) was not rendering the two non-tail truncation lineBreakModes correctly. There's not much history on github but it appears to me that it was set up correctly at one time and then some additional code was added for unclear reasons that assumed any truncation was at the end of the string.

This commit corrects both issues.

* Update CHANGELOG.md
2018-10-17 13:26:45 -07:00
appleguy
465abb1ded [License] Simplify the Texture license to be pure Apache 2 (removing ASDK-Licenses). (#1077)
* [License] Simplify the Texture license to be pure Apache 2 (removing ASDK-Licenses)

With permission of the Facebook Open Source team, we are simplifying the Texture
license so that clients can rely on the Apache 2 terms that most of Texture is
already covered by. This means that code originally forked from AsyncDisplayKit
will be re-licensed from "BSD 3-clause + PATENTS v2" to Apache 2 without a
PATENTS file.

After getting confirmation that the updates to these core files look good, we'll
propagate this new license header to all files (in this same PR) and get sign-off
from all parties before landing.

* [License] Update all Texture source files to be pure Apache 2.

* Changelog entry for Apache 2 license update.

* Revert "[License] Update all Texture source files to be pure Apache 2."

This reverts commit ffa0fbbba9717d871dd16c4b07539f2f8208fc2b.

* [License] Update all Texture source files to be pure Apache 2, maintaining copyrights.

* [License] Update CONTRIBUTING, README, Podspec & Dangerfile.
2018-08-28 07:39:18 -07:00
Adlai Holler
03e6ce0916
Reduce copying in ASTextNode2 stack (#1065)
* Remove copying in text stack, make text container have an optional immutable mode

* Changelog

* Comment

* Update CHANGELOG.md

* Use new name

* Import header
2018-08-07 08:32:43 -07:00
Adlai Holler
b136e84b4e
Add an experimental framesetter cache in ASTextNode2 (#1063)
* Add an experimental framesetter cache in ASTextNode2, and stop keeping framesetters around

* Update configuration schema

* Fix imports

* Fix import again and remove set statement
2018-08-04 07:33:53 -07:00
Adlai Holler
af7f71f92d
Address warnings in Xcode >= 9.3 about using %zd for NSInteger (#1026) 2018-07-13 11:56:54 -07:00
Michael Schneider
d28b17c87f
Fix warnings and memory issues (#1003) 2018-07-03 08:39:49 -07:00
Adlai Holler
dbe469a94a
Standardize "extern" decls on AS_EXTERN (#972)
* Standardize "extern" decls on AS_EXTERN

* Rebase & remove from implementation files
2018-06-18 15:53:34 -07:00
Adlai Holler
a11506564a
Reduce usage of autorelease pools (#968)
* Reduce reliance on the autorelease pool

* changelog

* A few more places

* Use it in another place
2018-06-15 10:15:25 -07:00
Adlai Holler
cac14e0bce
Standardize Property Declaration Style in Core Classes (#870)
* Audit property attributes for core classes

* Update style guide

* Go crazy

* Update changelog
2018-05-24 14:42:43 -07:00
Adlai Holler
2b12654810
Use NS_RETURNS_RETAINED macro to save time (#843)
* Use NS_RETURNS_RETAINED macro to save time

* Update changelog and do the thing with the license headers
2018-03-21 08:13:09 -07:00
Alex Hill
d9d9a29365 [tvOS] Fixes errors when building against tvOS SDK (#728)
* [tvOS] Fixes errors when building against tvOS SDK

* Update CHANGELOG.md

* [tvOS] Fixes implicit conversion between UIViewAnimationCurve +
UIViewAnimationOptions

* Enable tvOS deployment target in Texture.podspec (for CI)

* [ASMultiplexImageNode] Fixes typo

* [tvOS] Fixes warnings related to @available guards in Xcode 9
[ASMultiplexImageNode] Enables support for Photos framework on tvOS 10+

[ASMultiplexImageNode] Fixes comment depth

[ASAvailability] Adjust logic in AS_AVAILABLE_IOS_TVOS to account for
both versions
Adjusts API_AVAILABLE to minimum deployment target

* [ASAvailability] Update AS_AVAILABLE_XXX fallbacks to function more like
the built-in solution (more accurately target OS by checking target)
Change AS_AVAILABLE_IOS -> AS_AVAILABLE_IOS_TVOS in places that shoud
allow for both

[ASAvailability] Simplify AS_AVAILABLE_IOS_TVOS

* [ASControlNode] Adds missing 'super' call in -[ASControlNode didLoad]
when targeting tvOS

* Fix API_AVAILABLE iOS requirement

* [ASDisplayNode] Fixes last of the linker warnings related to category
overrides. Removes methods already implemented in
ASDisplayNode+UIViewBridge category.
[ASControlNode] Moves tvOS category declaration to ASControlNode header
[ASImageNode] Moves tvOS category declaration to ASImageNode header
[ASControlNode+Private] Adds private category for ASControlNode to
access private selectors

* [NSParagraphStyle+ASText] Fixes typo related to testing

* [ASControlNode] Re-add helpful comment

* [ASTextKitCoreTextAdditions] Adds mappings for kCTParagraphStyleSpecifierMinimumLineSpacing, kCTParagraphStyleSpecifierMaximumLineSpacing, kCTParagraphStyleSpecifierLineSpacingAdjustment when mapping CTParagraphStyle onto NSParagraphStyle
[ASTextNode] Uses CoreText-cleansed attributed string when assigning ascender/descender to avoid crash when a CTParagraphStyle is passed as an attribute

* [AsyncDisplayKit] Update project file to include new/deleted files

* [ASControlNode+tvOS] Add missing Foundation import (whoops!)
[ASImageNode+tvOS] Add missing Foundation import (whoops!)

* Update podspec to only link AssetsLibrary framework on iOS

* [ASTextKitCoreTextAdditions] If kCTParagraphStyleAttributeName key-value
evaluates to an NSParagraphStyle, pass through to cleansed attributes. This
fixes a bug that would occur if a CTParagraphStyle was passed as an
attribute _alone_ (would not be caught by unsupported attributes
check)

* [ASMultiplexImageNode] Bump availability check to support < Xcode 9

* [ASTraitCollection] Fixes typo that was causing build to fail

* Clean up formatting to adhere to character/line limit + braces
2018-03-11 16:37:27 -07:00
Adlai Holler
61dade6bda Raise deployment target to iOS 9 (#743)
https://github.com/TextureGroup/Texture/pull/743

Manually merged since I forgot to retarget that diff onto master before merge
2018-01-15 15:13:05 -08:00
Michael Schneider
526a7cfb53 Fix name clash with YYText (#623) 2017-10-18 15:49:58 -07:00
Mustafa Besnili
1e7d46196f Fix "This block and function declaration is not a prototype" warning. (#619) 2017-10-17 14:18:23 +01:00
Adlai Holler
4829a8643d Improve System Trace Implementation #trivial (#368)
* Improve the kdebug, system trace integration

* Remove superseded subsystem

* Address review comments

* Please the license header gods

* Address harder

* Fix node block retaining collection view
2017-06-19 10:14:39 -07:00
appleguy
6a28b740e6 [Cleanup] Small fixes to improve conformance for strict compiler settings #trivial (#320) 2017-05-29 18:11:18 -07:00
Adlai Holler
a1b6fd2cd7 Fix documentation warnings (#276) 2017-05-15 13:31:20 -07:00
Adlai Holler
d4725a51f2 Add Experimental Text Node Implementation (#259)
* Add experimental text node implementation, based on YYText

* Fix warnings and alert when unimplemented experimental features are used.

* Address feedback from review

* Extend the cthulog

* Update license headers
2017-05-14 12:02:07 -07:00