Skip to content

Commit

Permalink
Merge pull request #4490 from vishalduggal/timob-13695-31X
Browse files Browse the repository at this point in the history
[TIMOB-13695] (3_1_X) Doc update
  • Loading branch information
srahim committed Jul 25, 2013
2 parents 469e942 + 48d9468 commit 3bb1486
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 26 deletions.
20 changes: 12 additions & 8 deletions apidoc/Titanium/UI/Slider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,9 @@ properties:
the middle of the image, in the region between the end caps. The end caps themselves keep
their original size and appearance. This property specifies the size of the left end cap.
On iOS 5 and above the endCaps are used to compute a rectangle which is streched in
the strechable portion. On earlier versions of iOS the strechable portion is assumed to be
On iOS 6 and above the endCaps are used to compute a rectangle which is streched in
the strechable portion. On iOS 5.X, the computed rectangle is tiled in the strechable portion.
On earlier versions of iOS the strechable portion is assumed to be
1 pixel wide. The right end cap is therefore computed by adding the size of the left end cap
and the middle portion together and then subtracting that value from the width of the image
type: Number
Expand All @@ -257,8 +258,9 @@ properties:
the middle of the image, in the region between the end caps. The end caps themselves keep
their original size and appearance. This property specifies the size of the top end cap.
On iOS 5 and above the endCaps are used to compute a rectangle which is streched in
the strechable portion. On earlier versions of iOS the strechable portion is assumed to be
On iOS 6 and above the endCaps are used to compute a rectangle which is streched in
the strechable portion. On iOS 5.X, the computed rectangle is tiled in the strechable portion.
On earlier versions of iOS the strechable portion is assumed to be
1 pixel wide. The bottom end cap is therefore computed by adding the size of the top end cap
and the middle portion together and then subtracting that value from the height of the image
type: Number
Expand Down Expand Up @@ -339,8 +341,9 @@ properties:
the middle of the image, in the region between the end caps. The end caps themselves keep
their original size and appearance. This property specifies the size of the left end cap.
On iOS 5 and above the endCaps are used to compute a rectangle which is streched in
the strechable portion. On earlier versions of iOS the strechable portion is assumed to be
On iOS 6 and above the endCaps are used to compute a rectangle which is streched in
the strechable portion. On iOS 5.X, the computed rectangle is tiled in the strechable portion.
On earlier versions of iOS the strechable portion is assumed to be
1 pixel wide. The right end cap is therefore computed by adding the size of the left end cap
and the middle portion together and then subtracting that value from the width of the image
type: Number
Expand All @@ -360,8 +363,9 @@ properties:
the middle of the image, in the region between the end caps. The end caps themselves keep
their original size and appearance. This property specifies the size of the top end cap.
On iOS 5 and above the endCaps are used to compute a rectangle which is streched in
the strechable portion. On earlier versions of iOS the strechable portion is assumed to be
On iOS 6 and above the endCaps are used to compute a rectangle which is streched in
the strechable portion. On iOS 5.X, the computed rectangle is tiled in the strechable portion.
On earlier versions of iOS the strechable portion is assumed to be
1 pixel wide. The bottom end cap is therefore computed by adding the size of the top end cap
and the middle portion together and then subtracting that value from the height of the image
type: Number
Expand Down
37 changes: 19 additions & 18 deletions apidoc/Titanium/UI/View.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,23 @@ description: |
No error will occur on older devices if you set `accessibilityHidden`; the value will simply be ignored.
#### iOS: backgroundLeftCap and backgroundTopCap properties
The [backgroundLeftCap](Titanium.UI.View.backgroundLeftCap) and [backgroundTopCap](Titanium.UI.View.backgroundTopCap) properties are
used to specify the portions of the [backgroundImage](Titanium.UI.View.backgroundImage) that must not be resized when the image is streched or shrunk.
Given an image of width `w` and height `h`, the stretchable portion on the image is defined as a rectangle with the `top-left` point set to
`(backgroundLeftCap , backgroundTopCap)` and the `bottom-right` point set to `(w - backgroundLeftCap , h - backgroundTopCap)`. The portions not covered by
the stretchable portion keep their original size and appearance.
The behavior of these properties on [ImageView](Titanium.UI.ImageView) is slightly different and depends on the iOS version on the device.
* For iOS 6.x and above, the behavior is as described above.
* For iOS 5.x the computed rectangle is tiled and not streched in the stretchable portion.
* For iOS 4.x the strechable portion is always a 1x1 region that is tiled repeatedly.
For best results on ImageView set up the `backgroundLeftCap` and `backgroundTopCap` properties such that the stretchable portion is always a 1x1 box.
extends: Titanium.Proxy
since: "0.9"

Expand Down Expand Up @@ -892,15 +909,7 @@ properties:
- name: backgroundLeftCap
summary: Size of the left end cap.
description: |
End caps specify the portion of an image that should not be resized when an image is
stretched. This technique is used to implement buttons and other resizable image-based
interface elements. When a button with end caps is resized, the resizing occurs only in
the middle of the button, in the region between the end caps. The end caps themselves keep
their original size and appearance. This property specifies the size of the left end cap.
The middle (stretchable) portion is assumed to be 1 pixel wide. The right end cap is
therefore computed by adding the size of the left end cap and the middle portion together
and then subtracting that value from the width of the image.
If this property is set to `0`, the image is scaled uniformly.
See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in <Titanium.UI.View>.
type: Number
platforms: [iphone, ipad]
default: 0
Expand All @@ -927,15 +936,7 @@ properties:
- name: backgroundTopCap
summary: Size of the top end cap.
description: |
End caps specify the portion of an image that should not be resized when an image
is stretched. This technique is used to implement buttons and other resizable
image-based interface elements. When a button with end caps is resized, the resizing
occurs only in the middle of the button, in the region between the end caps. The end
caps themselves keep their original size and appearance. This property specifies the
size of the top end cap. The middle (stretchable) portion is assumed to be 1 pixel wide.
The bottom end cap is therefore computed by adding the size of the top end cap and the
middle portion together and then subtracting that value from the height of the image.
If this property is set to `0`, the image is scaled uniformly.
See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in <Titanium.UI.View>.
type: Number
platforms: [iphone, ipad]
default: 0
Expand Down

0 comments on commit 3bb1486

Please sign in to comment.