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-6366] Added constant for group tableview background. #2249

Merged
merged 2 commits into from
May 22, 2012
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
8 changes: 5 additions & 3 deletions apidoc/Titanium/UI/UI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,14 @@ description: |
If a color value is not valid on iOS, the default color is applied, whereas, on Android, the
color yellow is applied.

Besides the above mentioned colors, iOS also supports the following native system background colors.
Besides the above mentioned colors, the following constants can be used to specify iOS
system textures. These constants can be used wherever a color value is required:

* **[COLOR_SCROLLVIEW_BACKGROUND](Titanium.UI.iOS.COLOR_SCROLLVIEW_BACKGROUND)**
* **[COLOR_VIEW_FLIPSIDE_BACKGROUND](Titanium.UI.iOS.COLOR_VIEW_FLIPSIDE_BACKGROUND)**
* **[COLOR_UNDER_PAGE_BACKROUND](Titanium.UI.iOS.COLOR_UNDER_PAGE_BACKROUND)** - only
available on `iOS SDK 5.0 and above`.
* **[COLOR_GROUP_TABLEVIEW_BACKGROUND](Titanium.UI.iOS.COLOR_GROUP_TABLEVIEW_BACKGROUND)**
* **[COLOR_UNDER_PAGE_BACKGROUND](Titanium.UI.iOS.COLOR_UNDER_PAGE_BACKGROUND)** (Only
available on iOS SDK 5.0 and above.)

extends: Titanium.Module
since: "0.4"
Expand Down
29 changes: 25 additions & 4 deletions apidoc/Titanium/UI/iOS/iOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,21 +325,42 @@ properties:
permission: read-only
since: "1.8.1"

- name: COLOR_GROUP_TABLEVIEW_BACKGROUND
summary: Returns the iOS system texture used to render the background on a group table view.
description: |
Corresponds to iOS `UIColor` groupTableViewBackgroundColor`.

Can be used anywhere a color value is required. See also "Colors" in <Titanium.UI>.
type: String
permission: read-only
since: "2.1.0"

- name: COLOR_SCROLLVIEW_BACKGROUND
summary: Returns the iOS system pattern color used to render the area behind scrollable content.
summary: Returns the iOS system texture used to render the area behind scrollable content.
description: |
Corresponds to iOS `UIColor` `scrollViewTexturedBackgroundColor`.

Can be used anywhere a color value is required. See also "Colors" in <Titanium.UI>.
type: String
permission: read-only
since: "2.1.0"

- name: COLOR_VIEW_FLIPSIDE_BACKGROUND
summary: Returns the iOS system color used for the back side of a view while it is being flipped.
summary: Returns the iOS system texture used for the back side of a view while it is being flipped.
description: |
Corresponds to iOS `UIColor` `viewFlipsideBackgroundColor`.

Can be used anywhere a color value is required. See also "Colors" in <Titanium.UI>.
type: String
permission: read-only
since: "2.1.0"

- name: COLOR_UNDER_PAGE_BACKROUND
summary: Returns the iOS system pattern color used to render the background of a page.
- name: COLOR_UNDER_PAGE_BACKGROUND
summary: Returns the iOS system texture used to render the background of a page.
description: |
Corresponds to iOS `UIColor` `underPageBackgroundColor`.

Can be used anywhere a color value is required. See also "Colors" in <Titanium.UI>.
type: String
permission: read-only
since: "2.1.0"
Expand Down
3 changes: 2 additions & 1 deletion iphone/Classes/TiUIiOSProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ -(id)createTabbedBar:(id)args

MAKE_SYSTEM_STR(COLOR_SCROLLVIEW_BACKGROUND, IOS_COLOR_SCROLLVIEW_TEXTURED_BACKGROUND);
MAKE_SYSTEM_STR(COLOR_VIEW_FLIPSIDE_BACKGROUND, IOS_COLOR_VIEW_FLIPSIDE_BACKGROUND);
MAKE_SYSTEM_STR(COLOR_GROUP_TABLEVIEW_BACKGROUND, IOS_COLOR_GROUP_TABLEVIEW_BACKGROUND);

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_5_0
MAKE_SYSTEM_STR(COLOR_UNDER_PAGE_BACKGROUND, IOS_COLOR_UNDER_PAGE_BACKGROUND);
Expand All @@ -141,4 +142,4 @@ -(id)createTabbedBar:(id)args
#endif
@end

#endif
#endif
3 changes: 2 additions & 1 deletion iphone/Classes/Webcolor.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@
+(void)flushCache;
+(BOOL)isDarkColor:(UIColor*)color;

//constants for iOS backgrond texture colors.
//constants for iOS background texture colors.

extern NSString * const IOS_COLOR_SCROLLVIEW_TEXTURED_BACKGROUND;
extern NSString * const IOS_COLOR_VIEW_FLIPSIDE_BACKGROUND;
extern NSString * const IOS_COLOR_GROUP_TABLEVIEW_BACKGROUND;
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_5_0
extern NSString * const IOS_COLOR_UNDER_PAGE_BACKGROUND;
#endif
Expand Down
2 changes: 2 additions & 0 deletions iphone/Classes/Webcolor.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

NSString * const IOS_COLOR_SCROLLVIEW_TEXTURED_BACKGROUND = @"scrollview_textured";
NSString * const IOS_COLOR_VIEW_FLIPSIDE_BACKGROUND = @"view_flipside";
NSString * const IOS_COLOR_GROUP_TABLEVIEW_BACKGROUND = @"group_tableview";

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_5_0
NSString * const IOS_COLOR_UNDER_PAGE_BACKGROUND = @"under_page";
Expand Down Expand Up @@ -61,6 +62,7 @@ +(UIColor*)webColorNamed:(NSString*)colorName
[UIColor brownColor],@"brown",
[UIColor clearColor],@"transparent",
[UIColor groupTableViewBackgroundColor],@"stripped",
[UIColor groupTableViewBackgroundColor],IOS_COLOR_GROUP_TABLEVIEW_BACKGROUND,
[UIColor scrollViewTexturedBackgroundColor],IOS_COLOR_SCROLLVIEW_TEXTURED_BACKGROUND,
[UIColor viewFlipsideBackgroundColor],IOS_COLOR_VIEW_FLIPSIDE_BACKGROUND,

Expand Down