Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3010] iOS: Expose ScrollableView's pageControl foregroundColor

GitHub Issuen/a
TypeNew Feature
PriorityTrivial
StatusClosed
ResolutionInvalid
Resolution Date2011-04-15T03:34:43.000+0000
Affected Version/sn/a
Fix Version/sBacklog
ComponentsiOS
Labelsfeature, ios, klist, rplist
ReporterDawson Toth
AssigneeRalf Pfeiffer
Created2011-04-15T03:34:42.000+0000
Updated2018-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

Comments

  1. Dawson Toth 2011-04-15

    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.

  2. Martin Prebio 2011-04-15

    +1

    Exposing the attribute is much easier than creating an own view with all the Ti/iPhone magic.

  3. Reggie Seagraves 2011-04-15

    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.

  4. Terry Morgan 2014-03-19

    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?
  5. Dirlei DionĂ­sio 2016-08-24

    [2] It's now possible to set the tint colour of the dots. Any plans to implement this?
  6. Eric Merriman 2018-08-06

    Closing as invalid. If incorrect, please reopen.

JSON Source