[TIMOB-3010] iOS: Expose ScrollableView's pageControl foregroundColor
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Trivial |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-04-15T03:34:43.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Backlog |
Components | iOS |
Labels | feature, ios, klist, rplist |
Reporter | Dawson Toth |
Assignee | Ralf Pfeiffer |
Created | 2011-04-15T03:34:42.000+0000 |
Updated | 2018-08-06T17:37:06.000+0000 |
Description
Problem
Client wants to change the pageControl dots to a color different than white.
Suggested Solution
Add a property for the foreground color "pagingControlForegroundColor", similar to how we have "setPagingControlColor_" right now (which controls the background color of the paging control, but not the dots).
Sample Code
In 1.6.0, this will make a scrollable view with three white dots on a black background. With the new property, the dots would be red.
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
win.add(Titanium.UI.createScrollableView({
views:[
Titanium.UI.createView({backgroundColor:'#123'}),
Titanium.UI.createView({backgroundColor:'#231'}),
Titanium.UI.createView({backgroundColor:'#312'})
],
showPagingControl:true,
pagingControlColor: 'black',
pagingControlHeight: 50,
pagingControlForegroundColor: 'red'
}));
win.open();
Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/69461">http://developer.appcelerator.com/helpdesk/view/69461
Possible Workaround
Don't show the paging control, and overlay a custom view with images or buttons over the scrollable view. When the user touches one of these, tell the scrollable view to change the active view.
+1
Exposing the attribute is much easier than creating an own view with all the Ti/iPhone magic.
Apple does not provide an API to change the color of the dots on the UIPageControl. The client could implement their own custom control in this case.
Looks like this has changed with iOS7: https://developer.apple.com/library/ios/documentation/uikit/reference/UIPageControl_Class/Reference/Reference.html#//apple_ref/occ/instp/UIPageControl/currentPageIndicatorTintColor It's now possible to set the tint colour of the dots. Any plans to implement this?
[2] It's now possible to set the tint colour of the dots. Any plans to implement this?
Closing as invalid. If incorrect, please reopen.