Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-15680] Added Ti.UI.iOS.ATTRIBUTE_LETTERPRESS_STYLE constant #4923

Merged
merged 1 commit into from
Nov 8, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions apidoc/Titanium/UI/iOS/Attribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ properties:
color: 'red'
}

If you use the Titanium.UI.iOS.ATTRIBUTE_TEXT_EFFECT, you must use the only supported iOS 7 constant
<Titanium.UI.iOS.ATTRIBUTE_LETTERPRESS_STYLE>

type: Number
optional: false
- name: range
Expand Down
9 changes: 9 additions & 0 deletions apidoc/Titanium/UI/iOS/iOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ properties:
osver: {ios: {min: "6.0"}}
permission: read-only

- name: ATTRIBUTE_LETTERPRESS_STYLE
summary: |
Use with [Attribute.value](Attribute.value) to specify a value.
description: |
See <Attribute> for more information on value modes.
type: Number
osver: {ios: {min: "7.0"}}
permission: read-only

- name: ATTRIBUTE_KERN
summary: |
Use with [Attribute.type](Attribute.type) to specify a type.
Expand Down
3 changes: 3 additions & 0 deletions iphone/Classes/TiUIiOSProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ typedef enum {
@property (nonatomic,readonly) NSNumber* ATTRIBUTE_WRITING_DIRECTION_NATURAL;
@property (nonatomic,readonly) NSNumber* ATTRIBUTE_WRITING_DIRECTION_LEFT_TO_RIGHT;
@property (nonatomic,readonly) NSNumber* ATTRIBUTE_WRITING_DIRECTION_RIGHT_TO_LEFT;

@property (nonatomic,readonly) NSNumber* ATTRIBUTE_LETTERPRESS_STYLE;

// -----
#endif

Expand Down
4 changes: 4 additions & 0 deletions iphone/Classes/TiUIiOSProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ -(NSNumber*)ATTRIBUTE_WRITING_DIRECTION_OVERRIDE
{
return ([TiUtils isIOS7OrGreater] ? NUMINT(NSTextWritingDirectionOverride): NUMINT(NSWritingDirectionNatural));
}
-(NSString *)ATTRIBUTE_LETTERPRESS_STYLE
{
return ([TiUtils isIOS7OrGreater] ? NSTextEffectLetterpressStyle : @"");
}

#endif

Expand Down