Re: UIPageViewController page index woes

2013-09-28 Thread Noah Desch

So apparently the page control is entirely transparent by default. Try adding 
this to your app delegate's didFinishLaunching... method:

UIPageControl * pageControl = [UIPageControl appearance];
pageControl.pageIndicatorTintColor = [UIColor lightGrayColor];
pageControl.currentPageIndicatorTintColor = [UIColor darkGrayColor];
pageControl.backgroundColor = [UIColor clearColor];

This will apply a default customization to every page control in your app. The 
other way to apply non-transparent colors is to loop through all the sub-views 
of your UIPageViewController's view and look for the one who's kindOfClass is 
[UIPageControl class] and set whatever colors you want on it. This *might* be a 
gray area in terms of using undocumented API though.

-Noah


On Sep 26, 2013, at 5:06 PM, Noah Desch  wrote:

> I'm having the same issue. When I dive into the view hierarchy in the 
> debugger I see the page control inside the UIPageViewController's view, but 
> it's frame is {0,0,0,0}. 
> 
> Noah Desch
> 
>> On Sep 25, 2013, at 7:11 PM, Rick Mann  wrote:
>> 
>> 
>>> On Sep 25, 2013, at 15:27 , Daniel Höpfl  wrote:
>>> 
 On 25.09.2013 03:25, Rick Mann wrote:
 Any ideas? The example code doesn't use the page index.
>>> 
>>> Did you set the transition style to
>>> UIPageViewControllerTransitionStyleScroll?
>> 
>> 
>> Yup :-)
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: UIPageViewController page index woes

2013-09-26 Thread Noah Desch
I'm having the same issue. When I dive into the view hierarchy in the debugger 
I see the page control inside the UIPageViewController's view, but it's frame 
is {0,0,0,0}. 

Noah Desch

> On Sep 25, 2013, at 7:11 PM, Rick Mann  wrote:
> 
> 
>> On Sep 25, 2013, at 15:27 , Daniel Höpfl  wrote:
>> 
>>> On 25.09.2013 03:25, Rick Mann wrote:
>>> Any ideas? The example code doesn't use the page index.
>> 
>> Did you set the transition style to
>> UIPageViewControllerTransitionStyleScroll?
> 
> 
> Yup :-)
> 
> 
> 
> -- 
> Rick
> 
> 
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/deschnl%40me.com
> 
> This email sent to desc...@me.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: UIPageViewController page index woes

2013-09-25 Thread Rick Mann

On Sep 25, 2013, at 15:27 , Daniel Höpfl  wrote:

> On 25.09.2013 03:25, Rick Mann wrote:
>> Any ideas? The example code doesn't use the page index.
> 
> Did you set the transition style to
> UIPageViewControllerTransitionStyleScroll?


Yup :-)



-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: UIPageViewController page index woes

2013-09-25 Thread Daniel Höpfl
Hi,

On 25.09.2013 03:25, Rick Mann wrote:
> I've implemented the two page index methods in the dataSource, but
> I'm not getting a page indicator. Where does it appear, near the
> bottom? I see my methods are being called.
> 
> I also don't know how to determine the current page index.
> -presentationIndexForPageViewController: should return an NSInteger,
> but I don't know how to tell which view controller is currently being
> shown. I'm not even sure why I have to implement this, since just
> telling it the total count should be enough for it to figure things
> out.
> 
> Any ideas? The example code doesn't use the page index.

Did you set the transition style to
UIPageViewControllerTransitionStyleScroll?

The documentation says:


If both of the methods in “Supporting a Page Indicator” are implemented
*and* the page view controller’s transition style is
UIPageViewControllerTransitionStyleScroll, a page indicator is visible.


Bye,
   Daniel
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

UIPageViewController page index woes

2013-09-24 Thread Rick Mann
I've implemented the two page index methods in the dataSource, but I'm not 
getting a page indicator. Where does it appear, near the bottom? I see my 
methods are being called.

I also don't know how to determine the current page index. 
-presentationIndexForPageViewController: should return an NSInteger, but I 
don't know how to tell which view controller is currently being shown. I'm not 
even sure why I have to implement this, since just telling it the total count 
should be enough for it to figure things out.

Any ideas? The example code doesn't use the page index.

Thanks,

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com